Peter Bengtsson wrote:
But how do you use it? I installed Five 1.2.6
In my product's directory I created a configure.zcml that looks like this::
<i18n:registerTranslations directory="i18n" />
Starts without errors. My ryf-sv.po file isn't automatically compiled
Right. The Zope 3 machinery doesn't do that. Use msgfmt from the gettext
utilities to compile catalogs.
You're also using PTS's non-standard directory layout. The standard
gettext layout is somedir/LC_MESSAGES/<lang>/<domain>.mo. PTS supports
this as well but Plone continues not to go standard here and set a bad
and I tried changing the HTTP_ACCEPT_LANGUAGE variable but
still just the old default English.
HTTP_ACCEPT_LANGUAGE isn't a variable. It's an HTTP header
(Accept-Language) that you really shouldn't modify. The request should
be treated as read-only.
To test languages, either write your own IUserPreferredLanguages adapter
that returns the language you want or simply configure your browser to
send a different Accept-Language header. In Firefox, you can simply do
this by entering "about:config" in the URL bar and changing the setting
of the intl.accept_languages variable (e.g. to "se, en").
Either I've missed something big and crucial or there's a bug in lack
of errors or alerts.
You simply didn't read Five/doc/i18n.txt
(http://codespeak.net/z3/five/i18n.html). Googling "five i18n" gives you
that as a first hit. "RTFM" is all I can say here.
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -