Internationalization of streamlit - i18n

How to automatically switch the language displayed globally by clicking a button in streamlit?

There isn’t anything specific for localization yet. You can save a value in Session State to set a version and then conditionally fill in your app with the correct language based on the value in Session State.

Streamlit does offer some ability to read the user’s context if you want to try and determine in advance what language should be set, but ultimately you’ll have to store and read from a saved value to determine what language to use, and conditionally pull those language strings yourself in situ.

At present, we also plan to adopt this approach, but we just hope for a more convenient way. :laughing:

Perhaps it can be considered as a follow-up content or referenced to other front-end frameworks. I believe that if streamlit has complete related features, it would be a great choice for friends who are developing Python full stack.