Skip to content

Translations for sentences with form inputs that form part of the sentence? #935

Discussion options

You must be logged in to vote

If I understand your problem correctly, you can use interpolation of dynamic values. Then for each language you can set the placeholder for these values in different position in the sentence.
Additionally, if you need the value itself to be translated, you can translate it before sending as a parameter in the interpolation. Example:

const energy = t('energy')
const sentence = t('sentence', {energy})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@angusclarkdev
Comment options

Answer selected by angusclarkdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants