pysepal.sepalwidgets.vue_app.LocaleSelect#
- class pysepal.sepalwidgets.vue_app.LocaleSelect(*args, **kwargs)[source]#
Instantiate the LocaleSelect class.
The effective locale is resolved in the browser (localStorage ->
navigator.language-> “en”) and pushed back throughselected_locale; this class only mirrors the resolved value into the boundLocaleState.- Parameters:
translator (Translator | None) – Translator whose catalogs become the offered languages.
locales (Iterable[str] | None) – Offered locale codes, taking precedence over
translator.locale_state (LocaleState | None) – Shared state to mirror the resolved locale into.
kwargs – any argument for a VuetifyTemplate object.
Attributes
COUNTRIESavailable_localesAn instance of a Python list.
selected_localeA trait for unicode strings.
template_fileA trait for unicode strings.
valueA trait for unicode strings.
Methods
Instantiate the LocaleSelect class.
Bind the widget to a shared locale state.
Return the currently bound locale state.
- LocaleSelect.__init__(translator=None, locales=None, locale_state=None, **kwargs)[source]#
Instantiate the LocaleSelect class.
The effective locale is resolved in the browser (localStorage ->
navigator.language-> “en”) and pushed back throughselected_locale; this class only mirrors the resolved value into the boundLocaleState.- Parameters:
translator (Translator | None) – Translator whose catalogs become the offered languages.
locales (Iterable[str] | None) – Offered locale codes, taking precedence over
translator.locale_state (LocaleState | None) – Shared state to mirror the resolved locale into.
kwargs – any argument for a VuetifyTemplate object.
- LocaleSelect.bind_locale_state(locale_state)[source]#
Bind the widget to a shared locale state.
- Parameters:
locale_state (LocaleState | None)
- Return type:
None
- LocaleSelect.get_locale_state()[source]#
Return the currently bound locale state.
- Return type:
LocaleState | None