这里的一般问题是,当换行符的位置必须看起来令人赏心悦目时(与在特定单词后发生的换行符相反),如何在HTML页面上标记文本以进行翻译?
我有一个网页想要翻译成5种不同的语言。在某些地方,需要在一个小图标下显示“ 10,000个满意的用户所喜欢的文本”,并且需要以令人愉悦的方式显示。这看起来不错,因为名词短语在其单独的行上,并且每行具有大约相同数量的字母:
<icon>
Enjoyed by
10,000 happy users
我是否发送此文本以进行翻译?
Enjoyed by <br> 10,000 happy users
问题:
通过在文本中添加标记,这使得我不太可能在其他地方重用该字符串,但看不到任何其他选项。
鉴于翻译后的文字会有不同数量的字母(例如德语中的“ Genossen von
10.000glücklicheBenutzer”),我该如何处理
在翻译后文字中的放置方式?只需查看每个人如何在页面上手动呈现,并在翻译回来后自行调整
?
我看不到任何干净的方法可以做到这一点。我可以删除标记并尝试编写一些服务器代码,以在合适的位置添加分隔符,但是我看不到如何实现自动化(例如,如果前一行有足够的字母,则可能在自己的行上放置名词短语) )。 CSS的选择甚至更少。
答案 0 :(得分:0)
Your question is somewhat subjective, but I think your choices are to either trust your translators to format the HTML, or trust them to come up with copy that fits your design. Trying to engineer your way to a "clean" solution with server code sounds like it will achieve the exact opposite.
Make sure your design is good enough to cope with a reasonable range of word lengths. If your layout lives and dies by the text being exactly X characters long, then it isn't well designed. You can always ask your translators to try and write a translation in less than a maximum number of characters. This is why we still have human translators - they are also copywriters :)