sepal_ui.sepalwidgets.app.LocaleSelect#
- class sepal_ui.sepalwidgets.app.LocaleSelect(**kwargs)[source]#
A language selector for sepal-ui based application.
It displays the currently requested language (not the one used by the translator). When value is changed, the sepal-ui config file is updated. It is designed to be used in a AppBar component.
Warning
as the component is a v.Menu to get the selected value you need to lisen to “value” instead of “v_model”.
New in version 2.7.0.
- Parameters:
translator (Translator | None) – the translator of the app, to match the used language
kwargs (optional) – any arguments for a Btn object, children will be override
Attributes
ATTR
the default flag parameter, default to english
COUNTRIES
the country list as a df.
FLAG
the url of the svg flag images
btn
the btn to click when changing language
language_list
the list of countries with their flag,name in english, and ISO code
Methods
A language selector for sepal-ui based application.
- LocaleSelect.__init__(translator=None, **kwargs)[source]#
A language selector for sepal-ui based application.
It displays the currently requested language (not the one used by the translator). When value is changed, the sepal-ui config file is updated. It is designed to be used in a AppBar component.
Warning
as the component is a v.Menu to get the selected value you need to lisen to “value” instead of “v_model”.
New in version 2.7.0.
- Parameters:
translator (Translator | None) – the translator of the app, to match the used language
kwargs (optional) – any arguments for a Btn object, children will be override
- Return type:
None