Semantically marking up translations

好久不见. 提交于 2019-12-12 16:04:17

问题


I'm in the process of marking up an historical manuscript which has been translated from German into English. On the web page I will be providing both languages side by side. Is there an accepted way to markup such a scenario?

I was thinking of splitting the translation blocks using the section tag and providing each with a lang attribute. However semantically this fails at communicating that one section roughly equates to the other.

Any thoughts on this would be greatly appreciated.


回答1:


Without an example of the data it's hard to say; but is there a reason that you couldn't section them together, and provide the languages within sibling blockquotes; these then carry the context correctly, and can be styled to appear side by side.

<section>
    <blockquote lang="en">English</blockquote>
    <blockquote lang="de">Deutsch</blockquote>
</section>



回答2:


I think that table could be used here to relate the original text to its translation:

<table lang="en">
  <tr>
    <th>Original/English</th>
    <th>Translation/German</th>
  </tr>
  <tr>
    <td><blockquote>…</blockquote></td>
    <td lang="de"><blockquote>…</blockquote></td>
  </tr>
</table>

(assuming that both versions are actually quoted from a different source)

It would be possible to divide the original and the translation into sections or pages or paragraphs (or whatever), if useful, each represented by a separate row (tr).


See also my answer to a similar question.


Note that by using blockquote the headings of the manuscript (and the translation) are not part of the document outline.



来源:https://stackoverflow.com/questions/7229085/semantically-marking-up-translations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!