Skip to content

About

A Streamlit extension for easy localization of your apps (work in progress)

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

202 Commits

Folders and files

Repository files navigation

streamlit-gettext

Tests Documentation
PyPI Supported Python versions

🚧 WORK IN PROGRESS 🚧

A Streamlit extension that makes it easy to localize your apps. It detects users' preferred languages from their browsers and displays the app in the appropriate language. It avoids a common issue when using gettext in Streamlit: if the browser language is detected only once at startup, all users may see the app in the same language.

When a Streamlit app is deployed, reading the browser language only once at startup can cause every user to see the language detected for the first person who opened the app. streamlit-gettext avoids this by checking each user's browser language whenever it translates a message, so users sharing the same app can see it in different languages.

See a working app that uses streamlit-gettext: https://github.com/dfint/package-build

TODO:

  • example application
    Streamlit App
  • tests
  • documentation
  • support for manually switching languages, with the browser's preferred language selected by default
  • examples of translations with context
  • ...

Feedback and suggestions are welcome.

About

A Streamlit extension for easy localization of your apps (work in progress)

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages