python-babel / flask-babel

i18n and l10n support for Flask based on Babel and pytz
https://python-babel.github.io/flask-babel/
Other
432 stars 159 forks source link

lazy_gettext using multiple BABEL_TRANSLATION_DIRECTORIES #100

Closed dpgaspar closed 8 years ago

dpgaspar commented 8 years ago

Hi,

I'm trying to migrate away from my fork flask-babelpkg. With this fork i was implementing a merge between flask-appbuilder translations and the user's app translations.

On a first a approach before instantiating flask-babel i'm setting:

appbuilder_translations_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../translations')
app.config.setdefault('BABEL_TRANSLATION_DIRECTORIES', appbuilder_translations_path + ';translations')

But all my lazy_gettext call's don't get translated! Could you give me any help, guidance on this?

Thanks!

dpgaspar commented 8 years ago

Sorry, just found the problem. I was still importing the (hopefully) old flask-babelpkg. :P

TkTech commented 8 years ago

Hah! Let me know (by creating a ticket or PR) if there are features from your fork that you think are worth including.