There seem to be a lot of variations of how the workflow for localization should be. When I look at the documentation I find differences on all of the pages:
https://developer.mozilla.org/en-US/Apps/Build/Localization/Localizing_Firefox_OS_Apps
https://developer.mozilla.org/en-US/Apps/Build/Localization/Getting_started_with_app_localization
https://developer.mozilla.org/en-US/Apps/Build/Localization/Localizing_strings_in_JavaScript
https://github.com/robnyman/TranslationTester
https://github.com/robnyman/Firefox-OS-Boilerplate-App
I have tried all versions and combinations that I can think of (my phone is a Geeksphone Revolution running Firefox OS 2.0) but nothing works as intended. Either I get no text at all or I always get English.
To name one of the uncertainties, how should the localization link-tag look like. So far I have tried these variations (each with corresponding file structure for .ini/.properties files):
<link rel="prefetch" type="application/l10n" href="locales/locales.ini">
<link rel="resource" type="application/l10n" href="locales/locales.ini">
<link rel="localization" href="locales/{locale}/app.properties">
<link rel="prefetch" href="locales/{locale}/app.properties">
Since all documentation pages on developer.mozilla.org and the GitHub pages they link to looks different, how can I find out which is the standard way to work with localization for Firefox OS/b2g 2.x?
I believe this link: https://developer.mozilla.org/en-US/Apps/Build/Localization/Localizing_Firefox_OS_Apps reflects the latest changes in the l10n.js lib in Gaia.
The other methods can be used as long as you have the js file that supports it.
For example The translation tester app should work. I just tried it on 2.0 on a Flame and it worked fine. Using
<link rel="resource" type="application/l10n" href="locales/locales.ini" />
Should work. Look over this post: https://hacks.mozilla.org/2014/05/introducing-translationtester-and-localization-support-for-open-web-apps/ That Robert used with that example and uses a locales.ini file in the locales directory. Also check to see if your app is working in the 2.0 simulator.