Download the PHP package singlequote/laravel-locale-finder without Composer

On this page you can find all versions of the php package singlequote/laravel-locale-finder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-locale-finder

Laravel Translation Finder

Find all translation keys in your blades, scripts, files etc. and translate to the given language.

Latest Version on Packagist Total Downloads

Installation

Install the package using composer. Save the package to the dev section for the package is only needed when developing your project. If you need it on your production, remove the --dev option.

Publish config

You can change the behaviour of the package by editing the config file. Publish the config file with the command below.

Usage

The package searches for translations key in your blade files. For example {{ __("My translation") }}. Or @lang('My Translation'). After searching the package will try to translate the keys using the google translate package.

When removing translations from your view, the package will also remove the keys from the files.

The command can be used from the commandline

For example, find and translate all dutch translation keys

or find and translate the dutch and german translations keys

Translate all available locales

The all option will scan your lang folder and select the available .json files.

Change source

If you develop your application in a different language you can change the defualt source from en to something else.

Disabling key translations

If you would like to just get the keys from your views, you can use the --notranslate option. This will fill the values with the default keys.

Exclude keys

If you want the package to only search for specific translation keys, you can use the --only option. This will exclude everthing outside the --only scope.

The above will exclude every translation key that doesn't belong in the app directive.

For example:

Add multiple only keys to your command

Using patterns

When using modules or large translation files, it can be a lot of work to fill the --only option with all keys. You can use the * pattern to include keys. For example if you execute the command below:

Create missing php key files

When adding new translations keys such as __("newkey.some text") the file newkey.php should exists in order to add the translation keys. When using the --create option the package will auto generate these files.

Beta

Modules

When using modules in your laravel package with their own lang folder, you would like to add the keys to the right files in the module folders.

So for example when we have a module called Horses and we loaded the translations using $this->loadTranslationsFrom(PATHTOTRANS, "horses"); in our Service provider. The key should be something like this : __("horses::") and with a translation __("horsed.colors.red") where colors.php is the file.

When using the --modules option, the package will auto detect the loaded translation files and adds the keys to the right files.

Contributing

Please see CONTRIBUTING for details.

Postcardware

You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Quotec, Traktieweg 8c 8304 BA, Emmeloord, Netherlands.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-locale-finder with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/framework Version >=9
stichoza/google-translate-php Version ^4.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package singlequote/laravel-locale-finder contains the following files

Loading the files please wait ....