pysepal.sepalwidgets.app.LocaleSelect#
- class pysepal.sepalwidgets.app.LocaleSelect(*args, **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”.
Added 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
COUNTRIESthe country list as a df.
FLAGthe url of the svg flag images
btnthe btn to click when changing language
language_listthe 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”.
Added 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