[Zope3-Users] Re: Preferred languages
Philipp von Weitershausen
philipp at weitershausen.de
Fri Apr 18 07:47:46 EDT 2008
Frank Burkhardt wrote:
> Hi,
>
> there's a problem with my web application. It's written in Zope 3
> and makes heavy use of i18n (-> _("..."), i18n:translate, ...).
>
> I extracted the english strings and made a german translation (language code
> 'de'). Whenever my browser's "most" preferred language is 'de' or 'de-de'
> (example: "Accept-Language: de-de,en;q=0.5" ), everything works fine.
>
> But when I switch to 'en','de' (example: "Accept-Language: en,de-de;q=0.5" ,
> the result is unexpected. Zope returns german translations although english
> strings are available (hardcoded into the application).
>
> Is there a way to tell Zope to use the hardcoded strings, when 'en' is
> requested?
Register (empty) English translations for your project, e.g. by creating
an 'en/LC_MESSAGES' directory and placing an empty foo.po plus a
compiled foo.mo file inside (foo being your translation domain).
More information about the Zope3-users
mailing list