Skip to content

Adding a translation

bobdenotter edited this page Mar 19, 2013 · 8 revisions

Creating a Bolt 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:

Step 1: Bolt 1.1

Do a checkout of 'master', and get it running

Step 2: Config

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':

shot1

Step 3: Creating the files

If you click one of these options, you'll most likely get a notice like this:

shot2

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 $ 

Step 3: Translating the files

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.

Step 4: Submitting 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! :-)

Clone this wiki locally