Other
Translations
Cargo is developed in English. However, if you speak another language, you're more than welcome to contribute translations back to Cargo.
Any validation messages on the frontend or text in the Control Panel can be translated.
Configuration
You can read more about changing the language used in the Control Panel over on the Statamic docs.
Available translations
| Language | Code |
|---|---|
| French | fr |
| German | de |
State names
State names are translated using the cargo::states.{country}.{code} key, where {country} is the ISO 3166-1 alpha-3 country code and {code} is the state's code. Cargo ships German translations for Germany, Austria and Switzerland.
To translate or override state names in your app, create a lang/vendor/cargo/{locale}/states.php file:
return [
'DEU' => [
'BY' => 'Bayern',
'HE' => 'Hessen',
],
];
Any states you don't list will fall back to the name in states.json.
Contributing translations
- In your app, create a
{locale}.jsonfile in thelangdirectory (orresources/langfor older apps).- The locale should follow the language code standard.
- Find a list of the translatable strings by searching
__(in Cargo's code.- You don't need to translate strings that Statamic already translates.
- In the JSON file you created, ensure the key is the English text and the value is your translated text:
{
"Orders": "**Bestellungen**"
}
- Follow these steps if you'd like to contribute your translations to Cargo:
- Fork the
statamic-cargorepository - Copy your JSON file into the
langdirectory. - Copy the files from
lang/eninto alang/{locale}directory, and translate the values. These contain field instructions and validation messages. - Commit, push and open a pull request
- Fork the