chinese traditional from taiwan and the html lang attribute

M

Mohawk Mawk

Hi guys,
I am creating a Taiwanese page and basically my problem is this:
The font on the page changes according to the html lang attribute.
zh (looks like zh-CN)
zh-TW (doesn't look the same, looks like zh-TW)
zh-Hant-TW (looks like zh-CN again)

Check http://commons.wikimedia.org/wiki/File:Vergleich_zh-Hant-CN_zh-Hant-TW_ja-Hani_ko-Hani.png
to see the differences.

Now I would think I should use zh-Hant-TW (hant = Han Traditional)
but I'm bothered that it displays the same as zh-CN (who use Hans =
Han Simplified) and not like zh-TW
I'm just confused on what it should really be set to.

Regards
Mark
 
J

Jukka K. Korpela

Mohawk said:
I am creating a Taiwanese page and basically my problem is this:
The font on the page changes according to the html lang attribute.

That's supposed to be part of a solution rather than a problem, but in this
universe, solutions often turn into problems.
zh (looks like zh-CN)
zh-TW (doesn't look the same, looks like zh-TW)
zh-Hant-TW (looks like zh-CN again)

This depends on the browser and its settings. The most widely recognized way
of specifying (in HTML) the version of Chinese writing system you're using
is lang="zh-CN" vs. lang="zh-TW", even though this can be regarded as
illogical (as many other features of the language code system).
Now I would think I should use zh-Hant-TW (hant = Han Traditional)
but I'm bothered that it displays the same as zh-CN (who use Hans =
Han Simplified) and not like zh-TW
I'm just confused on what it should really be set to.

It would be most logical to use zh-Hant if you wish to specify the writing
system variant only, and zh-Hant-TW if you additionally wish to specify the
language variant by area. But logic has its cost, and zh-TW is a practical
solution.

On the other hand, the lang attribute has an effect on the rendering of
Chinese text only when the font is not specified in HTML or CSS in an
effective manner. If you set, say,
* { font-family: Arial Unicode MS; }
then lang attributes won't affect rendering of those characters that exist
in Arial Unicode MS as installed (if it is) on the user's system. I'm
deliberately mentioning a dull font here. The point is that if you can write
a list of suitable fonts so that at least one of them is installed on most
Chinese users' systems, then you can ignore the lang attribute as fas as
rendering is considered. It is good to use language markup as a matter of
principle, but it has surprisingly little effect in practice.

For your information, though I'm not sure at all whether you need it, the
factory settings of IE 7 on Vista use by default PMingLiU for text
recognized as traditional Chinese and SimSun for simplified Chinese. So
using a font-family declaration including (e.g. as the last one in the list)
PMingLiU, you effectively get the same rendering result for Vista users as
using lang="zh-TW". I'm pretty sure there are web resources about Chinese
font that let you plan the strategy more accurately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top