Skip to content

Is it possible to set directories at runtime? #238

Description

@kingkong-cmd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions