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

how to get all localizations of a string?

0 views
Skip to first unread message

Leni

unread,
Nov 15, 2009, 10:55:39 PM11/15/09
to dev-ext...@lists.mozilla.org
Hi -

I am wondering how to get all localizations of a string.

For example, lets say my extension has an xyz.properties file localized
for en-US, de-DE and fr-FR. Then from Javascript, I'd like to get the
english, german and french translations of a string in xyz.properties,
regardless of the current locale.

One guess I had at how to do this was to have multiple stringbundle
elements - each with a "src" attribute corresponding to a locale, eg:
"chrome://myapp/locale/de-DE/xyz.properties"
But that url causes nsiStringBundle.GetStringFromName to throw an
NS_ERROR_UNEXPECTED exception.

I'm out of ideas - any pointers appreciated.

Leni.

0 new messages