What is the best practice about HTML tags in internationalized strings.
Is that OK to use <p>, <br>, <ul><li> inside strings that are used for translation of HTML UI?
What are the best practices here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is something to be discussed with the translation agency or translators. I would expect professional translators to be able and willing to deal with data as HTML fragments, but this should be agreed on and documented. You should also check out whether XHTML format (with e.g.
<br />and not<br>) is needed, since some software tools used by translators might require it.It is often crucial to use HTML fragments rather than plain texts, especially when there is inline (text-level) markup. If sentences are split to pieces, which are translated separately, then put together again, then result will often be awful, maybe incomprehensible.
The size of the chunks depends on the context and overall organization of translation work. Usually the best results are achieved if a translator can work with an entire page and even see the site context, but that’s not always possible. You often need to divide the text to pieces, like headings, paragraphs, and items of a list. They are units that can often be translated reasonably, without wider context, whereas anything smaller tends to cause serious problems. (I have often had to explain why strings like “From” and “To”, though perhaps perfectly reasonable in a user interface, just cannot be translated without context into a language that lacks prepositions.)