Localization and T&Ds
In Terms and Definitions, preferred terms, alternate terms and deprecated terms are expected to be given in both Chinese and English. By default, Metanorma-GB does this by detecting space-delimited runs of Han or Latin script text:
alt:[rough rice 糙米]<admitted language="zh">糙米</admitted> <admitted language="en">rough rice</admitted>However if there is script mixing in a term -- if the Chinese term contains a Latin script acronym or a mathematical expression, for example -- the Chinese term will not be detected correctly. To address this, the formatting macros +[zh]#...#+ and +[en]#...#+ are used. If they are present, then the content of those macros is treated as the Chinese and English equivalents of the parent node instead:
=== [en]#XYZ paddy# [zh]#水稻XY#]
alt:[[en]#rough rice# [zh]#糙米#]<preferred language="en">XYZ paddy</preferred> <preferred language="zh">水稻XYZ</preferred>
<admitted language="zh">糙米</admitted> <admitted language="en">rough rice</admitted>No further markup is permitted within the +[zh]#...#+ and +[en]#...#+ macros, and AsciiDoc does not correctly nest inline macros within other inline macros (so +en:[_xyz_ zh:[xyz]+ would not give correct behaviour either.)
Localization strings can be used anywhere else in the document where the grammar permits localized strings (notably in bibliographic data). For example, a bibliographic title can be given in two languages as follows. (Note that formatting appears outside the language macros.)
[[[ISO7301,ISO 7301:2011]]], _[zh]#大米 - 规格# [en]#Rice -- Specification#_ <bibitem id="ISO7301" type="standard">
<title language="zh">大米 - 规格</title> <title language="en">Rice‑Specification</title>
<docidentifier>ISO 7301</docidentifier>
<date type="published">
<from>2011</from>
</date>
<contributor>
<role type="publisher"/>
<organization>
<name>International Organization for Standardization</name>
<abbreviation>ISO</abbreviation>
</organization>
</contributor>
</bibitem>Metanorma-GB also supports +[zh-Hant]#...#+ and +[zh-Hans]#...#+ to differentiate traditional and simplified script in ISOXML. zh-Hant is provisionally supported through changing font in the output.