What is a correct approach to using strong/em tags when localising strings?

前端 未结 4 1983
Happy的楠姐
Happy的楠姐 2021-01-12 18:41

I know some languages emphasise words differently to English, e.g. via changing word endings rather than stressing words with inflection of the voice.

If you are lo

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 19:26

    For individual words, I would leave the markup tags in the translation strings for the reasons outlined in comments above. If emphasising blocks of text, whole sentences, numerals, etc, I'd put it in the template if possible as it's not really something that would need to be be messed with by the translation.

    A good idea might be to flag in the template the you have done this using comments. You will also need some reliable process for getting all the translation files changed if you decide to alter the emphasis ever (which you inevitably will). This is a pain, so I tend to avoid adding emphasis to individual words wherever possible :)

提交回复
热议问题