Wednesday, August 3, 2011

Translation/Locale Xliff based module is done

My Question on Support site for LampCMS project

Hello!
I know it has been a long time since the last post. I am very busy these days and only have several hours a week to work on this project.

I finally finished the Translation module for this site. Translation module is done using Xliff standard. I'm sure you can Google it if you don't know what it is.

The code is in the latest commit on github

So far I have translated 52 strings (there has gotto be at least as many left to translate) into Russian language.
I don't know any other languages and even my Russian is rusty.

You can test it by selecting Russian from the drop-down menu at the bottom of this site.

Anyway, the Russian translations file is a good example of how you can translate this site into any other language.

You need to just copy the file from /translations/messages.ru.xlf into your own language and save the new file as /translations/messages.fr.xlf (if you going to be using French)

You can also use Locale-specific translations, for example messages.en_GB.xlf

Remember that .xlf files are xml files and must be a valid xml.

If you want to contribute your own translations just send me a copy of your own .xlf translation file.

To add more language options to your site add more locale choices to your config.ini file
There is now a [LOCALES] section in it.

Add something like this:

[LOCALES]
en_US = "English (United States)"
en_GB = "English (United Kingdom)"
fr_FR = "French"
fr_CA = "French (Canadian)"
de = "German"
es = "Spanish (Spain)"
ru_RU = "Russian"

These will become the choices in the drop-down menu at the bottom of the pages.

Click here to post your reply


No comments:

Post a Comment