From MozillaWiki
Jump to: navigation, search

This draft currently only covers the translation aspect of localization. The w3c specifies several other areas of localization including dates, currencies, etc. We'll need to determine the scope of this project and adjust the requirements accordingly.

Current aspects of gettext that we'd still want:

  • Support direct string to string lookups (this is the standard use case)
  • Support string parameters
  • Support reordering string parameters
  • Support plurals (although, a cleaner way than ngettext() would be nice)

Additional requirements:

  • Support declinations / gender of phrases
    • This will require passing an "object" to the library, so it can determine the appropriate translation from all the parts passed in
  • Support developer specified (or localizer specified?) fallback.
    • If a string is not available in the requested language, return it in the first available language
      • This will also need to return what locale it is returning the translation in (and what text direction?)
    • Number/locale of fallbacks should be arbitrary. For example, zh-TW -> zh-CN -> de-DE -> en-US should work
    • A way to support capitalization (or at least override it if necessary)

As we expand our requirements and put additional logic into the localization library (eg. handling "objects") we can expect the complexity to increase. It's important that we keep things as simple as possible for localizers to keep the barrier of entry low.

Next: L20n issues