Laravel Lang Help

Contribution Guide

Contributions are welcome and will be fully credited.

We accept contributions through Pull Requests on all projects of our organization.

What do the files mean?

  • php.json - contains translations of values for PHP localization files.

  • php-inline.json - contains inline translations of values for PHP localization files.

  • json.json - contains translations of values for JSON localization files.

  • json-inline.json - contains inline translations of values for JSON localization files.

  • _excludes.json - contains those values whose translation is the same as in English. Please note that this file contains a list of values, not keys.

How to change files?

All files available for translation have a json extension and are located in the locales folder. Open the desired file and make changes.

  1. Open the localization file

  2. Change key values.

  3. Create a commit and push it

  4. Create a Pull Request specifying the locale code for which you are making changes. For example:

How to add a new locale?

For Laravel Lang projects

As a rule, all our projects already contain available localizations, but if you want to suggest a new one, write to us about it.

For third-party projects

Make sure you have the laravel-lang/status-generator package installed and run the console command:

vendor/bin/lang create <locale> # vendor/bin/lang create fr

If you want to install all the missing locales, then run the command without specifying the localization code:

vendor/bin/lang create

Coding style

Laravel-Lang Team follows the PER 2.0 coding standard and the PSR-4 autoloading standard.

The easiest way to maintain style code is to use the dragon-code/codestyler package.

Code of Conduct

The Laravel code of conduct is derived from the Contributor Covenant code of conduct. Any violations of the code of conduct may be reported to Andrey Helldar, Fred Delrieu:

  • Participants will be tolerant of opposing views.

  • Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.

  • When interpreting the words and actions of others, participants should always assume good intentions.

  • Behavior that can be reasonably considered harassment will not be tolerated.

Last modified: 01 April 2024