-
-
Notifications
You must be signed in to change notification settings - Fork 810
Adding a translation
Version 1.1 of Bolt will allow localisation of the backend.
If you want to provide a translation for Bolt in your language, your help will be greatly appreciated. To make a translation, do the the following:
Do a checkout of 'master', and get it running
Edit config.yml, set the locale to the one you wish to add:
# The locale that'll be used by the application. If no locale is set the # fallback locale is 'en_GB'. For available options, see: docs.bolt.cm/locales locale: pt_BR
Obviously, replace the pt_BR
with the language/locale you wish to add. Check here for the list of common locales.
Now, when you go to the backend as a 'developer' user, you'll see three new options under 'Settings':
If you click one of these options, you'll most likely get a notice like this:
Either create this file and make it writable, or just create the folder and (temporarily) make it writable. Now, click all three links, and make sure all three are initialised by clicking the 'save' button at the bottom.
You should now have three files, like this:
[15:48:39] bob@macmini:bolt $ dir app/resources/translations/pt/ total 40 0 drwxrwxrwx 5 bob staff 170 Mar 19 15:48 . 0 drwxr-xr-x 6 bob staff 204 Mar 19 15:39 .. 8 -rw-r--r-- 1 bob staff 2484 Mar 19 15:42 contenttypes.pt.yml 16 -rw-r--r-- 1 bob staff 5421 Mar 19 15:48 infos.pt.yml 16 -rw-r--r-- 1 bob staff 7443 Mar 19 15:43 messages.pt.yml [15:48:55] bob@macmini:bolt $
Now the real work can start: translating the files. You can edit the labels in the Bolt interface, but be aware that since these are .yml files, things will break if you 'save' a non-valid file. This means that if you've added a lot of labels and you've 'broken' the yml, that your changes are lost when you click 'save'.
What we suggest is this: Edit the files in a standard editor to do the bulk of the work. Save often, check the Bolt backend to see your work in progress. You can use the interface in Bolt to finetune your results.
When you're done, you can either do a fork/pull-request, or just email us the new files at info [@] bolt.cm. Whatever's most convenient.
Thank you for helping us improve! :-)
- Bolt Wiki Home
- Tuesday Dev meetings
- Curated list of articles and tutorials
- Bolt internationalisation (i18n)
- Bolt Style Guide
- Roadmap
- TODOs
- [Tests] Unit & Functional Split
- [Tests] Code Coverage
- Core Team
- Bug/feature Process
-
Release Process
- Branching
- Packaging release builds