Template:Zh: Difference between revisions

From Xeno Series Wiki
Jump to navigation Jump to search
mNo edit summary
(Testing an alternative Chinese font)
Line 1: Line 1:
<span style="font-family:Arial Unicode MS,Code2000,EPSON,Meiryo" lang="zh">{{rollover|{{#if:{{{3|}}}|<ruby><rb>{{{1}}}</rb><rp> (</rp><rt>{{{3}}}</rt><rp>)</rp></ruby>|{{{1}}}}}|{{#ifeq:{{{2}}}|_|Chinese text|{{{2|Chinese text}}}}}|{{#ifeq:{{{2|_}}}|_||y}}}}</span><includeonly>{{#ifeq:{{{2|}}}||[[Category:Pages missing Chinese readings]]}}</includeonly><noinclude>
<span style="font-family:Arial Unicode MS,Code2000,EPSON,SimSun,Meiryo" lang="zh">{{rollover|{{#if:{{{3|}}}|<ruby><rb>{{{1}}}</rb><rp> (</rp><rt>{{{3}}}</rt><rp>)</rp></ruby>|{{{1}}}}}|{{#ifeq:{{{2}}}|_|Chinese text|{{{2|Chinese text}}}}}|{{#ifeq:{{{2|_}}}|_||y}}}}</span><includeonly>{{#ifeq:{{{2|}}}||[[Category:Pages missing Chinese readings]]}}</includeonly><noinclude>


{{/doc}}
{{/doc}}


[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Revision as of 04:01, 6 May 2024

{{{1}}}

This template is for displaying Chinese text (both simplified and traditional). Example: {{zh|修爾克|Xiū'ěr kè}} = 修爾克

text     = Chinese text
rollover = explanatory text to display in rollover, default "Chinese text"
ruby     = optional ruby text

"Ruby text" is for the pronunciation guide that appears overtop the actual text (or beside if the browser doesn't support it), example: {{zh|僕從|Púcóng (Zhuāngzhì)|裝置}} = 僕從 (裝置)

If no rollover text is given, the page this template is used on will automatically be put into Category:Pages missing Chinese readings. If it is supposed to not have rollover text, this can be bypassed by using '_'.

This template tries to force the text to be displayed in a font that supports Chinese. Hopefully any computer will have at least one of them on it. The fonts used are, in the order they are attempted:

  • Arial Unicode MS (any system with Microsoft Office, Mac OS X x10.5+)
  • Code2000 (older well-known Unicode font)
  • EPSON
  • Noto Sans SC (font commonly used in Simplified Chinese; the TC version doesn't fully support simplified characters)
  • Microsoft YaHei (all Windows since Vista, used instead of Meiryo because Meiryo formats characters like 关/复 to half-width)
  • Meiryo (all Windows since Vista)