Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Localization (and externalization) of strings for Firefox OS Web Apps for multiple language support

51 views
Skip to first unread message

Aitor Mendaza Ormaza

unread,
Apr 30, 2013, 10:08:40 AM4/30/13
to
Hi to everyone:
I'm new to Firefox OS app development, and I come from Android development. I was wondering if there is a way to localize text of applications in a similar way as it is done in Android (one file for each language).
I was looking on internet, but I only found this:
https://developer.mozilla.org/en-US/docs/DOM/window.navigator.language

if ( window.navigator.language != "en" ) {
doLangSelect(window.navigator.language);
}

And I see it is quite easy. My question is, how the doLangSelect should be implemented? Is there an easy way in firefox OS apps? or a best practices?

Thanks for your help
Best Regards!
Aitor Mendaza

Mounir Lamouri

unread,
Apr 30, 2013, 12:11:32 PM4/30/13
to dev-w...@lists.mozilla.org
Hi Aitor,

Firefox OS built-in applications are using this:
https://github.com/fabi1cazenave/webL10n

I would highly recommend you to use that library if you want to handle
l10n in your application context.

Cheers,
--
Mounir
0 new messages