const Input = props => (
<InputWrapper
skew={props.skew}
>
<InputElement
skew={props.skew}
placeholder={props.placeholder}
type={props.type}
/>
</InputWrapper>
);
I'm trying to find an example online explaining how I use the <FormattedMessage id="" defaultMessage="" /> component for placeholders. We have JSON files where we set the different languages for it to point to. So as an example that I have above the ID would point to the json file and then into that object to pick the right value for the language. So we'd have multiple json files for each language.
How would we go about doing this for a placeholder attribute as I need to return a string instead.
If I assume it correctly:
JSONfile.idspecifies the translationdefaultMessageproperty of aFormattedMessagecomponentIf that is incorrect please comment. If it's correct i would:
FormattedMessagecomponentIn some
util.jsxfile:In
FormattedTranslatedMessage.jsx:Please comment if my suggestions are wrong or i could improve the answer...