Skip to main content

Language selector

Examples

Check out the Usage section for details about how to design a language selector properly, and the different configuration options we provide.

Basic example

The LanguageSelector component renders a dropdown that allows a user to select a language.

<LanguageSelector
id="languageSelector
"/>

List example

By default, the LanguageSelector component will populate its list of languages automatically based on your LanguageContext. You can override this by supplying a list of language ISO codes to the availableLanguageValues property.

<LanguageSelector 
id="languageSelector"
availableLanguageValues={['en', 'fr-FR', 'de-DE']}
/>