Google map uses "zh-CN" while Drupal use "zh-Hans".
ditu.google.com has better China map than maps.google.com.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shenzhuxi’s picture

Version: 6.x-1.1 » 7.x-1.x-dev

Google map uses "zh-CN" while Drupal use "zh-Hans".

This may be one the only one case in which Google api uses different local codes.

rogical’s picture

Good patch, can we commit it?

attiks’s picture

related issue #365615: Language detection not working correctly for most Chinese readers (and add a user interface for all browser language mappings)

Keep in mind that zh-hans can be any of the following:
zh-cn // China
zh-sg // Singapore

zh-hant can be:
zh-tw // Taiwan
zh-hk // Hong Kong
zh-mo // Macau

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work
git apply --check gmap_8.patch
error: patch failed: gmap.module:326
error: gmap.module: patch does not apply

can You reroll this patch against latest dev ?

shenzhuxi’s picture

FileSize
1.83 KB

add zh-hans and zh-hant conditions.

podarok’s picture

#5 looks good

commited / pushed to 7.x-2.x dev

thanks!!!

podarok’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
git checkout 7.x-1.x
Switched to branch '7.x-1.x'
root@pubuntu:~/gmap# git apply --check 870350.patch
error: patch failed: gmap.module:326
error: gmap.module: patch does not apply
podarok’s picture

Issue tags: +needs backport to 1.x

needs backport for 7.x-1.x-dev

johnv’s picture

Status: Needs work » Needs review
FileSize
1.1 KB

See attached patch. In 2.4, some code was duplicated, so 1.x patch is smaller.
[Edit] there are also a few other differences, so better disregard this patch.

The last submitted patch, gmap1x_870350_8_china.patch, failed testing.

johnv’s picture

Status: Needs review » Needs work

@chinese folks,
The current patch & module use maps.google for the API.
According to below link, we should be using: maps.googleapis.com
https://developers.google.com/maps/documentation/geocoding/#GeocodingReq...

What is the best link for the chinese versions?
Should we still be using : //ditu.google.cn/maps/ ?

skyredwang’s picture

I can't find any documentation suggesting that we should use different endpoints (http://maps.googleapis.com/) for different locales. Therefore, I would say that we use "http://maps.googleapis.com/" for all locale, which makes the #6 commit inappropriate.

podarok’s picture

#9 has a lot of Notices in code
needs work

johnv’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Needs review
FileSize
3.86 KB

This patch removes //ditu.google.cn/maps/ , and does some reshuffleing.

Status: Needs review » Needs work

The last submitted patch, gmap2_870350_14_china.patch, failed testing.

johnv’s picture

Status: Needs work » Needs review
FileSize
2.34 KB

new try - didn't refresh my git.

podarok’s picture

Status: Needs review » Fixed

#16 commited pushed to 7.x-2.x
thanks!!!

Status: Fixed » Closed (fixed)
Issue tags: -China, -needs backport to 1.x

Automatically closed -- issue fixed for 2 weeks with no activity.