-
-
Notifications
You must be signed in to change notification settings - Fork 160
Contribute on translations
Bolt uses Symfony's translations layer. If you'd like to help us keep the different translations up to date, or perhaps even add a new one, you're more than welcome. There are a number of ways you can update a translation:
Add the language code to locales:
in config/packages/translation.yaml
:
translation:
locales: ['en', 'nl', 'es', 'fr', 'de', 'pl', 'it', 'pt_BR']
The term locale refers roughly to the user's language and country. It can be any string that your application uses to manage translations and other format differences (e.g. currency format).
You can use either an ISO 639-1 language code, like nl
, or an ISO 639-1 language code, an underscore (_), then the ISO 3166-1 alpha-2 country code, for example fr_FR
for French/France. For more information, see the Symfony docs.
Add the same new locale to config/services.yaml
parameters:
…
app_locales: en|nl|es|fr|de|pl|it|pt_BR
Note: Before Bolt 4 stable is released, we'll make it so you'll only need to add it in one location.
Finally, go to the page to edit your profile, and select your new locale:
There are no less than four different ways to edit the language files:
If you're on a page you can directly edit the used translation labels from there. Click the Translation nub on the debug toolbar:
From there you can find the translations that need adding under the "Missing" and "Fallback" tabs:
After updating the file(s), make a Pull Request to get your contributed translations into the Bolt 4 core.
You can edit the xlf
files directly, located in the translations/
folder in your project root. You can do this in your text-editor of choice, or using an Open Source tool like Using Poedit or Virtaal.
After updating the file(s), make a Pull Request to get your contributed translations into the Bolt 4 core.
Navigate to the "Edit Translations" page, found under 'Maintenance' > 'Translations / Labels'. Click the language you want to edit, and make your changes.
After updating the file(s), make a Pull Request to get your contributed translations into the Bolt 4 core.
We're using Localise.biz to manage the translations. If you have an account on that service, and wish to help out managing the translations, ping me (Bob) on Slack, and we'll get you set up.