i have a dropdown menu that lists say option1, option2 and option3. i would like to translate these options using react-i18next. I am new to translations and using this framework.
Below is the code,
export default class Example extends React.Component {
render() {
return (
<ParentComponent>
<button type="button">
{this.props.placeholder}
</button>
{this.props.values.map(value => (
<Item
key={value[this.props.value_prop]}
value={value}
on_select={this.change}>
{value[this.props.label_prop]} // i want to
translate this
</Item>
))}
</ParentComponent>
);
}
Could someone provide an idea of how to go about this...or help me solve this. thanks.