2013-03-20 45 views
2

我想提供歌词,书籍摘录和更多的翻译翻译。结果应该是这样的:最佳语义与笔记

原文第1部分(例如段落)
翻译文本部分1名
备注部分1

原文部分2
翻译的文本部分2
对部分 注意事项2

到目前为止,我会做基本的加价这里Semantically marking up translations建议。

<section> 
<blockquote lang="en"> 
    original text part 1 
    <footer>— Crazy hunch-backed old guy from the movie Aladdin</footer> 
</blockquote> 
<blockquote lang="de"> 
    translated text part 1 
    <footer>— Crazy hunch-backed old guy from the movie Aladdin</footer> 
</blockquote> 
<p>notes on part 1</p> 
</section> 

<section> 
<blockquote lang="en"> 
    original text part 2 
    <footer>— Crazy hunch-backed old guy from the movie Aladdin</footer> 
</blockquote> 
<blockquote lang="de"> 
    translated text part 2 
    <footer>— Crazy hunch-backed old guy from the movie Aladdin</footer> 
</blockquote> 
<p>notes on part 2</p> 
</section> 

有没有更好的方法来做到这一点,或者这是我们目前能做的最好的方法?

我尤其感兴趣的是什么,如果有一种方式来纪念优雅的所有部件属于同一来源,而不必重复它的每个段落。

来源将被归于此处http://html5doctor.com/blockquote-q-cite/(搜索“OMG a heading!”,相关部分在此之后开始)。

+0

请注意,引用的来源(在'footer'中给出)不应该是'blockquote'的一部分。 'blockquote'只能*包含引用的内容。 – unor 2013-03-22 20:40:42

回答

1

您可以使用table element

<table> 
    <tr> 
    <th>Original/English</th> 
    <th>Translation/German</th> 
    </tr> 
    <tr> 
    <td><blockquote><p>A wizard is never late… nor is he early.</p></blockquote></td> 
    <td lang="de"><p>Ein Zauberer kommt nie zu spät … ebensowenig zu früh.</p></td> 
    </tr> 
</table> 

<p class="note">Gandalf said this in …</p> 

通过使用table,可以明确这两个片段是彼此相关。

额外的翻译可以很容易地添加。

我认为整个页面都是英文的(例如lang="en",html);如果没有,你应该设置在包含英文原版的tdlang="en"

正如您所看到的,我只使用作为原始(英文)内容,假设您正在翻译自己的内容。如果这是真的,你是不是引用什么,所以你不应该为翻译使用。但是,如果您正在从其他来源获取译文,则也应该使用。

要使用什么“容器”?它取决于整个页面结构/上下文。如果存在自然标题,则可能要为每个组使用section(由原始文本,翻译和注释组成)。

你也可以使用一个table所有群体,如:

<table> 
    <tr> 
    <th>Original/English</th> 
    <th>Translation/German</th> 
    <th>Notes</th> 
    </tr> 
    <tr> 
    <td><blockquote><p>A wizard is never late… nor is he early.</p></blockquote></td> 
    <td lang="de"><p>Ein Zauberer kommt nie zu spät … ebensowenig zu früh.</p></td> 
    <td><p>Gandalf said this in …</p></td> 
    </tr> 
    <tr> 
    <td><blockquote><p>…</p></blockquote></td> 
    <td lang="de"><p>…</p></td> 
    <td><p>…</p></td> 
    </tr> 
</table> 

(一个额外的“标题栏”可以给于各行的标题/描述)

这真的取决于在实际页面上。

+0

这仍然是我能找到的最佳解决方案。 – spiel 2014-01-23 13:14:27

0

也许这样的事情会为你工作?

<blockquote> 
    <blockquote> This is a blockquote</blockquote> 
    <blockquote> This is another blockquote</blockquote> 
    <footer>- Test</footer> 
</blockquote> 
+1

但是通过在blockquote中添加blockquote,这不是说我引用了一个引用别人的人吗?其代码为 – spiel 2013-03-20 23:53:12

+0

。让它做任何你想做的事,没有任何一点意味着它会放慢自己的语义。你可以使用类来使内部块引用看起来像外部引用的一部分。 – 2013-03-21 18:01:11

+1

这根本没有帮助。我知道我可以设计所有我想要的样式,但我希望编码尽可能正确。对于每个花时间去实际学习并跟上他们所做事情的每个人来说,说“没有意义的是它会减少语义”。语义标记的存在是有原因的,并不是因为有人认为每个人都会让编程变得更加困难。感谢您尽力帮助。 – spiel 2013-03-22 00:13:15