Localization
All components are fully localized. In case of the select this covers button copy, rtl and more. You can see how each example shows up by clicking on the small flag icon or checking the examples below.
All settings can be manually overridden See what options the localization impacts →
Demo
Set localization to
<Select
locale={locale }
/>
JSXTSX
import { localeEs, Select, setOptions } from '@mobiscroll/react';
import { useMemo } from 'react';
setOptions({
theme: ' ',
themeVariant: ' '
});
function App() {
const myData = useMemo(
() => [
{
text: 'Atlanta',
value: 'atl',
},
{
text: 'Berlin',
value: 'ber',
},
{
text: 'Boston',
value: 'bos',
},
{
text: 'Chicago',
value: 'chi',
},
{
text: 'London',
value: 'lon',
},
{
text: 'Los Angeles',
value: 'la',
},
{
text: 'New York',
value: 'ny',
},
{
text: 'Paris',
value: 'par',
},
{
text: 'San Francisco',
value: 'sf',
},
],
[],
);
return (
<Select
data={myData}
label="Select"
labelStyle="stacked"
inputStyle="outline"
placeholder="Please Select..."
display="bottom"
locale={localeEs} // Sets the language of the component
/>
);
}
export default App;
import { localeEs, Select, setOptions } from '@mobiscroll/react';
setOptions({
theme: ' ',
themeVariant: ' '
});
const myData = [
{
text: 'Atlanta',
value: 'atl',
},
{
text: 'Berlin',
value: 'ber',
},
{
text: 'Boston',
value: 'bos',
},
{
text: 'Chicago',
value: 'chi',
},
{
text: 'London',
value: 'lon',
},
{
text: 'Los Angeles',
value: 'la',
},
{
text: 'New York',
value: 'ny',
},
{
text: 'Paris',
value: 'par',
},
{
text: 'San Francisco',
value: 'sf',
},
];
function App() {
return (
<Select
data={myData}
label="Select"
labelStyle="stacked"
inputStyle="outline"
placeholder="Please Select..."
display="bottom"
locale={localeEs} // Sets the language of the component
/>
);
}
export default App;