core icon indicating copy to clipboard operation
core copied to clipboard

How we can translate sentences with html selectors in between.

Open alopgudhate opened this issue 4 years ago • 1 comments

For example if I want to translate sentence "my favourite animal is {dropdown value /dropdown}."

In English this can be valid sentence but if I always keep dropdown value in the end this is not necessary that this will be valid in other languages. Suppose in other language dropdown value should be in between somewhere.

How we can achieve that?

alopgudhate avatar Jun 17 '21 12:06 alopgudhate

I am also curious about an answer to this question. At the moment, it seems like you can embed simple HTML tags in your translations, but this method doesn't allow you to do some complex template interpolation. We would like to be able to use arbitraryly complex elements and put specific parts of the translations inside these elements.

Like these vue people do in their i18n library -> https://kazupon.github.io/vue-i18n/guide/interpolation.html#basic-usage

borasemiz avatar Dec 01 '21 11:12 borasemiz