SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist Mr. Tech's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    562
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to put Mandarin Chinese on a website?

    I have a client who wants me to create a Mandarin Chinese version of the site for him.

    Is there anything special I have to do in order to show this language on a website?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to specify a font that includes Chinese ideographs.
    You need to use a character encoding that can represent those characters (preferably UTF-8).
    You should specify the language using the lang attribute. Do it for the root element if the whole page is in Mandarin, or for a specific container if only part of the page is in Chinese.
    For HTML:
    HTML Code:
    <html lang="zh">
    For real XHTML:
    HTML Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
    For pretend-XHTML (served as text/html):
    HTML Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •