Friday, July 3, 2009

Testing Extension Localization

Due to some latest feedback and offers for translation I started looking at localizing JumpStart. That is something that I have been putting off for a long time. I guess I needed some reminding that localization is not something nice to have, it is really a must.
All is well, it's not really hard to localize an extension - well at least not technically, finding right phrases for translation is another story. But how to test this now? I completely switched to Linux at home so this short tip is for Linux users.

If you want to start your Firefox under a different locale from the one set at the system level you have to use command that goes something like this:

LANGUAGE=en_US LANG=en_US.UTF-8 firefox -no-remote -P "your_profile_name"
(Firefox command line arguments)
If your locale is in fact en_US :) and you want to test Serbian for example you could change your language like this:
LANGUAGE=sr_RS LANG=sr_RS.UTF-8 firefox -no-remote -P "your_profile_name"
You could even use language that is not installed on your machine, for example I don't have German locales installed but I can still use de_DE to test my extension:
LANGUAGE=de_DE LANG=de_DE.UTF-8 firefox -no-remote -P "your_profile_name"
The Firefox obviously won't be shown in language you don't have installed on your machine but your extension will be showing it if you have it localized for the language.

I dug out this information from some old Ubuntu forum thread, hope you find it useful. If you have better way of doing this please let me know.

2 comments:

  1. This way doesn't work currently. Use the -uiLocale option (platform independent):

    https://developer.mozilla.org/en/Command_Line_Options#-UILocale_locale

    ReplyDelete