This document may contain examples in another language or script.
Use accesskey "n" to jump to the internal navigation links at any point. Right now you can
Some browsers apply the fonts listed in the user font preferences to the display of HTML Unicode text in Traditional Chinese, Simplified Chinese, Japanese and Korean, depending on the setting of the lang/xml:lang attribute. Note that this is not specified in the HTML specification, and, of course, doesn't apply where explicit styling is applied.
I wrote a test for this. The test assumes that different default fonts are assigned in the browser's font preferences for Simplified Chinese, Traditional Chinese, Japanese, and Korean (so that you can tell the difference). The test is written in XHTML 1.0 and served as text/html.
Here is a summary of the results of some brief testing of mainstream browsers on Windows XP. I may update this as additional information becomes available.
| none | zh | zh-CN | zh-Hans | zh-TW | zh-HK | zh-Hant | ja | ko | |
|---|---|---|---|---|---|---|---|---|---|
| Firefox 0.9.3 | JA | SC | SC | SC | TC | TC | SC | JA | KO |
| Mozilla 1.7.2 | JA | SC | SC | SC | TC | TC | SC | JA | KO |
| IE 6.0 | JA | SC | SC | JA | TC | SC | JA | JA | KO |
| Navigator 7.1 | X | SC | SC | SC | TC | SC | SC | JA | KO |
| Opera 7.54 | KO | KO | KO | KO | KO | KO | KO | KO | KO |
The titles across the top indicate the language attribute declared for a paragraph containing Han text. The results show which font was applied. JA = Japanese, SC = Simplified Chinese, TC = Traditional Chinese, KO = Korean, X = a totally different font.
Opera doesn't play this game at all.
The default Han font for Firefox and IE is Japanese, but for Netscape it is a completely different font than any set for the CJK languages.
zh-Hans and zh-Hant take on the zh font in Firefox, Netscape and Mozilla, but are not recognised at all in IE and take the Japanese default. Note that there is a bugfix in place for Mozilla that will handle zh-Hans and zh-Hant properly.
IE uses a Simplified Chinese font for zh-HK.
If you are desperate to make this work, and can't wait for the fix in (I believe) the next version of Mozilla, you can try this hack.
Open the 'res' subdirectory of your mozilla installation directory and find the file langGroups.properties. Open the file and add the two lines:
zh-hans=zh-CN zh-hant=zh-TW
I18N Test Suite: language tagging and CJK fonts http://www.w3.org/International/tests/sec-cjk-fonts
Description of zh-Hans and zh-Hant http://www.w3.org/International/tutorials/tutorial-lang/#specifying
Other W3C I18N resources relating to Language http://www.w3.org/International/resource-index#lang