• Resolved Apprique

    (@apprique)


    My site has two languages: English and Traditional Chinese (zh_HK). Polylang adds a alternate link to the page code to indicate this: <link rel="alternate" href="http://www.domain.com/hk/" hreflang="hk" />

    However, lately the Google Search Console (former Google Webmaster Tools) reports that ‘hk’ is an unknown language code, which is true according to the ISO standards. In the Polylang settings I have tried to specify zh-HK as the code for the zh_HK locale, but Polylang reports that “The language code contains invalid characters”.

    How should I proceed in this case?

    https://wordpress.org/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi
    Did you change the “Language code” to hk in Polylang settings instead of zh as in the predifined list?

    Thread Starter Apprique

    (@apprique)

    Uhm, perhaps I did, that has been a while. The site used to have three languages: zh_CN (Simplified Chinese), zh_HK (Traditional Chinese) and en_US (English), we put zh_CN on hold at some point.
    In any case when we need to reenable zh_CN, we will need to have separate language codes for zh_HK and zh_CN. Which one to use for zh_HK?

    Plugin Support Chrystl

    (@chrystl)

    You can use zh-hk for zh_HK and zh-cn for zh_CN.

    Thread Starter Apprique

    (@apprique)

    Thanks! My mistake. I tried zh-HK, which was said to contain illegal characters. I assumed it was the -, but apparently it’s the capitals that are not allowed. Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Language code for Hong Kong Chinese (or Traditional Chinese)’ is closed to new replies.