betty.gui.locale module¶
Provide locale management for the Graphical User Interface.
- class betty.gui.locale.LocalizedObject[source]¶
Bases:
objectA PyQt6.QtWidgets.QWidget mix-in to localize widgets, and re-localize them when the locale changes.
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- __init__(app: betty.app.App, *args: Any, **kwargs: Any)[source]¶
- Parameters:
app (
betty.app.App)args (
typing.Any)kwargs (
typing.Any)
- class betty.gui.locale.TranslationsLocaleCollector[source]¶
Bases:
LocalizedObjectHelps users select a locale for which translations are available.
- Parameters:
app (
betty.app.App)
- __init__(app: betty.app.App, allowed_locales: set[str])[source]¶
- Parameters:
app (
betty.app.App)
- property locale: QComboBox¶
The selected locale.