Is it possible to set directories at runtime? #1053
Unanswered
kingkong-cmd
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Edit: Apoligies, i thought i posted this to Flask-babel. Deleting.
Hi,
I am wondering if it is possible to somehow set directories/translation_directories at runtime the same way you can point locale_selector to a function that runs at every request?
I have been using flask-babel a bit outside of it's intended scope where I have translation paths like translations/app_1 and translations/app_2 where both can have 'en'/'es'/'ge' translations, with slight variations that are not actual translations (e.g. 'car' in app_1 is "translated" to 'boat' in app_2). This setup works fine if i run separate instances of the apps where I set default paths in config for each app, but I'm trying to find a way to run as a single instance app, but need to point to correct translations path+file at runtime.
Beta Was this translation helpful? Give feedback.
All reactions