[Zope3-dev] Translation question

Lennart Regebro lennart@torped.se
Tue, 21 May 2002 18:31:13 +0200


From: "Barry A. Warsaw" <barry@zope.com>
> I've been told by i18n'ers that you might want a hierarchy of language
> tags, e.g. you might make a request for a phrase in en_US but you'd be
> happy if the translation were available in a shared catalog for US and
> UK English.

Yup.

> Other languages may also have multiple dialects that
> share many common translations, with just a few specializations in
> each dialect.

> This probably means that IMessageCatalogs should be hierarchical.  If
> an ITranslationService doesn't use catalogs then it should still be
> prepared to handle destination languages from general (en) to specific
> (en_US).

Well, only the language negotiation needs to take care of this hierarchical
pattern. I expect the result of the language negotiation to produce a list
of language preferences. This would then be used to look up the wanted
translation, and would then enable the fall back from en_us to en_uk if both
translations were availiable, but no translation existed for that specific
phrase.