Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to set directories at runtime? #238

Open
kingkong-cmd opened this issue Dec 24, 2023 · 0 comments
Open

Is it possible to set directories at runtime? #238

kingkong-cmd opened this issue Dec 24, 2023 · 0 comments

Comments

@kingkong-cmd
Copy link

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 the 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant