chinese traditional from taiwan and the html lang attribute

Discussion in 'HTML' started by Mohawk Mawk, Dec 15, 2008.

  1. Mohawk Mawk

    Mohawk Mawk Guest

    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
    Mohawk Mawk, Dec 15, 2008
    #1
    1. Advertising

  2. Mohawk Mawk wrote:

    > 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.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Dec 15, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    505
    steve
    Dec 24, 2004
  2. Link
    Replies:
    0
    Views:
    279
  3. Replies:
    1
    Views:
    345
    Nick Chan
    Sep 17, 2007
  4. wsj
    Replies:
    0
    Views:
    147
  5. Elie Grouchko
    Replies:
    1
    Views:
    152
Loading...

Share This Page