How do you handle translation of text with markup?

前端 未结 6 1362
既然无缘
既然无缘 2020-12-23 10:04

I\'m developing multi-language support for our web app. We\'re using Django\'s helpers around the gettext library. Everything has been surprisingly easy, except for the ques

6条回答
  •  無奈伤痛
    2020-12-23 10:13

    Solution 2 is what you want. Send them the whole sentence, with the HTML markup embedded.

    Reasons:

    1. The predominant translation tool, Trados, can preserve the markup from inadvertent corruption by a translator.
    2. Trados can also auto-translate text that it has seen before, even if the content of the tags have changed (but the number of tags and their position in the sentence are the same). At the very least, the translator will give you a good discount.
    3. Styling is locale-specific. In some cases, bold will be inappropriate in Chinese or Japanese, and italics are less commonly used in East Asian languages, for example. The translator should have the freedom to either keep or remove the styles.
    4. Word order is language-specific. If you were to segment the above sentence into fragments, it might work for English and French, but in Chinese or Japanese the word order would not be correct when you concatenate. For this reason, it is best i18n practice to externalize entire sentences, not sentence fragments.

提交回复
热议问题