Localization and Plurals

This article is very confusing

In the first examples the APIs are used to show details about the API. This makes it very hard for a newbie to distinguish use from reference when they are trying to get their heads around new concepts.

Later it is not clearly explained why makeGetter is needed. It turns out the basic functions know about the overall locale but not about each particular extension's native locale but the wording makes this hard to grok.

Instead of introducing the APIs in the current order I would suggest a clean separation of telling people to use the makeGetter functions in extensions and the basic functions in core code.

I would also deemphasize numForms() which is basically a kind of introspection and not needed when simply adding plural-aware localization to extensions or core.

But I would emphasize the need for a numForms=nnn entry in the .properties file since this seems very important but poorly explained.

Also I wonder why it is that we need to explicitly state the number of forms an extension's native locale has. The extension already makes its locale known to Firefox, so surely it could look up the number of plural forms for that locale just as it does for the browser's locale.

One more source of confusion is why we need #1 etc when the localization tutorials go to lengths to teach as to use %1$S etc.

The sample code makes it look like PluralForms does not play nicely with getFormattedString but it seems if you ignore that code it's not so hard to use both in such a way that localizers can still rearrange the order of terms etc.

I might edit the article myself but on my current setup (Eee PC) I am unable to test other locales to gain confidence that I have finally understood the APIs correctly. — Hippietrail 07:31, 19 July 2008 (PDT)

Differences in order from gettext

Hi, this is a very useful grouping, and I see it expanded upon those in gettext. However, I was wondering why the ordering was changed in the case of the Baltic languages, Latvian (rule #3) and Lithuanian (rule #6) and only for these? -- Brettz9 23 November 2009

Document Tags and Contributors

Contributors to this page: Brettz9, Hippietrail
Last updated by: Brettz9,