Until recently, Mozilla’s L10n process had been a mystery to me. I first encountered localization when I worked on 1 Billion + You, and during that campaign I knew little about how localization was taking place from a technical perspective. The L10n team took care of all the details and the site was translated into over 30 languages.
Now that we’re redesigning the website for Student Reps, I’ve learned about the tools that are used to localize a site. If you’re interested in localization, this post will provide a good primer so you can understand the technical side of an L10n project.
Using gettext as the localization format
There are a few localization formats from which to choose. Based on the scale of the project and our familiarity with it, we chose to utilize the gettext format for our localizations. Gettext allows us to easily add new languages to our project, and it also works well with Verbatim, the web interface our translators use.
In the first step, we use gettext to generate language-specific files. Gettext will give us a .po file for each language we need. In fact, this process can be easily automated by running a script. Once we have the files in the target languages, we compile these .po files into .mo binaries that will be used on the live site.
Managing Translations with Verbatim
Verbatim is a web localization tool for Mozilla projects that allows translators to localize the site without editing text files (such as .po files for gettext). Localizers create an account, choose a project and language, and then start translating.
The web interface is very simple and makes it easy to view the status of a project or particular language. On the left side of their display, localizers see the string that needs to be translated. On the right side, localizers enter suggested translations for each string. Those translations are then reviewed for correctness by a reviewer for that locale. Once a string’s translation is approved, it is committed using svn and shows up on the staged site.