Change code for both Traditional Chinese and Simplified Chinese to work

New home Forums Basic Version General queries Change code for both Traditional Chinese and Simplified Chinese to work

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #61454
    A Web Developer
    Participant

    In WordPress, the locale code for Traditional Chinese is zh_TW and the locale code for Simplified Chinese is zh_CN. In the WP Google Maps plugin, inside the file:

    “wp-google-maps/includes/class.google-maps.api-loader.php”

    Inside the function “getGoogleMapsAPIParams()”, there is a line:

    $locale = substr($locale, 0, 2);

    This line would set the locale to just “zh” for the locales “zh_TW” or “zh_CN”. The problem with this is that Google Map will then default the language to Simplified Chinese. Therefore, the Traditional Chinese site will display Simplified Chinese Google Map interface – which is not correct. I can fix this by commenting out the line mentioned above.

    Therefore, I would like to request either to remove above line in future versions, or do a check for Chinese language like there is a check for Hebrew. For example,

    if (($locale != ‘zh_TW’) and ($locale != ‘zh_CN’)) {
    $locale = substr($locale, 0, 2);
    }

    Thanks a lot.

    #61457
    Steven
    Moderator

    Hi there,

    Thank you so much for getting in touch, we really appreciate your time.

    I will kindly pass this onto our lead developers to be looked into.

    Thank you kindly for informing us of the above issue.

    Kindest Regards,
    Steven De Beer

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.