Hi,
I am using Turbogears 1.0.6 with activated internationalization and
have several external Python modules, that will be translated
separately. My project hierarchy looks like this:
application/
common/
inhouse/ (the actual Turbogears application)
locales/
swe/
tglib/
locales/
and I configured Turbogears like this in the application config
(inhouse/config/app.cfg):
i18n.run_template_filter = True
i18n.default_locale = "de"
i18n.domain = "messages"
I want to use the domain "messages" for the main project folder
"inhouse" and separate gettext domains for all included, external
modules (common, swe, tglib). E.g. I defined the gettext domain in
tglib/__init__.py via:
import gettext
from os.path import abspath, dirname, join
LOCALE_DIR = abspath(join(dirname(__file__), "locales"))
GETTEXT_DOMAIN = "tglib"
gettext.bindtextdomain(GETTEXT_DOMAIN, LOCALE_DIR)
gettext.textdomain(GETTEXT_DOMAIN)
After translating and compiling the tglib.po file, I copied the mo
file into the inhouse/locales directory, but all strings from the
tglib module are still in English, so it seems to me, that the
application only uses the "messages" textdomain from the main
Turbogears application. In contrast to that, the strings from the
"messages" domain are loaded correctly. Am I using the wrong bind
methods or do I have to configure Turbogears in a different way to use
multiple gettext domains?
Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---