Download the PHP package jorisvanw/laravel-larex without Composer

On this page you can find all versions of the php package jorisvanw/laravel-larex. 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-larex

Laravel Larex

Version Downloads PHP Laravel License Build Coverage

Laravel Larex lets you translate your whole Laravel application with a single CSV file.

You can import translation entries from resources/lang files into a structured CSV, edit the translations and export them back to Laravel PHP files.

Laravel Larex also supports functionalities to sort entries and find strings that aren't localized yet.

See Plugins section for other features.

🚀 Installation

You can install the package using composer

Then add the service provider to config/app.php.
This step can be skipped if package auto-discovery is enabled.

⚙ Publishing the config file

Publishing the config file is optional:

👓 Usage

  1. First, you must create the initial CSV file with php artisan larex:init.
    Or you can use php artisan larex:import to import entries from resources/lang files.
    The csv file has the following columns:

    • group (basically the file name)
    • key (the array key)
    • en (the language code)
    • other language codes...
  2. Open the project-root/resources/lang/localization.csv file and edit it as you see fit.

  3. Finally, you can use php artisan larex:export to translate your entries from the csv file to the laravel php files.

✨ Tips

📝 Example

  1. Run php artisan larex:init command

  2. Edit the project-root/resources/lang/localization.csv file
group key en it
app hello Hello Ciao
app list.developers Developers Sviluppatori
app list.teachers Teachers Insegnanti
  1. Run php artisan larex:export command

  2. You'll get the following files:

⏫ Exporters

The larex:export <exporter> command exports CSV strings to a specific location based on the selected exporter.

Exporter Default Description
laravel Yes Export data from CSV to Laravel localization files
json:group No Export data from CSV to JSON by group
json:lang No Export data from CSV to JSON by language
How to create an exporter:
  1. Create a class that implements the Lukasss93\Larex\Contracts\Exporter interface
  2. Add your exporter inside the larex config

⏬ Importers

The larex:import <importer> command imports the strings of the selected importer, into the CSV.

Importer Default Description
laravel Yes Import data from Laravel localization files to CSV
json:group No Import data from JSON by group to CSV
json:lang No Import data from JSON by language to CSV
How to create an importer:
  1. Create a class that implements the Lukasss93\Larex\Contracts\Importer interface
  2. Add your importer inside the larex config

🔍 Linters

Larex provides a linting system by using the php artisan larex:lint command to validate your CSV file.

Available linters:
Linter Enabled by default Description
ValidHeaderLinter Yes Validate the header structure
ValidLanguageCodeLinter Yes Validate the language codes in the header columns
DuplicateKeyLinter Yes Find duplicated keys
ConcurrentKeyLinter Yes Find concurrent keys
NoValueLinter Yes Find missing values
DuplicateValueLinter Yes Find duplicated values in the same row
UntranslatedStringsLinter No Find untranslated strings
UntranslatedStringsLinter No Find unused strings
ValidHtmlValueLinter No Check valid html values

You can enable/disable any linter you want by comment/uncomment it inside the larex config.

How to create a linter:
  1. Create a class that implements the Lukasss93\Larex\Contracts\Linter interface
  2. Add your linter inside the larex config

🧩 Plugins

⚗️ Testing

🔰 Version Support

Larex L5.8 L6.x L7.x L8.x L9.x
^1.0
^1.2 | ^2.0
^3.0
^4.0
Larex PHP7.2 PHP7.3 PHP7.4 PHP8.0 PHP8.1
^1.0
^1.6 | ^2.0
^3.0
^4.0

📃 Changelog

Please see the CHANGELOG.md for more information on what has changed recently.

🏅 Credits

📖 License

Please see the LICENSE.md file for more information.


All versions of laravel-larex with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-dom Version *
ext-json Version *
illuminate/support Version ^8.0|^9.0
loilo/fuse Version ^6.4.6
spatie/simple-excel Version ^1.13.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 jorisvanw/laravel-larex contains the following files

Loading the files please wait ....