Hello,

In China, there would be only one address line, and the sequence of input is:

province, city, address(only 1), Postal Code, no state.

This is a good module, so it's a pity if it not suits China, the default form is very confusing for normal Chinese users.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mparker17’s picture

Subscribe!

mparker17’s picture

FileSize
35.12 KB

To clarify the statement above, the addressing standards for Hong Kong, the People's Republic of China, and Taiwan (the Republic of China) are all different.

I'm using two sources for the information below:

Hong Kong uses addressing standards that look more familiar to us in Canada+Britain+US (i.e.: from the smallest geographical component (i.e.: apartment number, street number) to the largest geographical component (i.e.: province, country — I'll call this "English-style" for now).

The PRC uses different address formats depending on whether the address is written in Chinese or Latin characters. If the address is written in Latin characters, it uses "English-style". However, if the address is written using Chinese characters, it is written from the largest geographical component (i.e.: country, province) to the smallest (i.e.: street number, apartment number).

The ROC uses a similar addressing system to the PRC (I am terribly slow at reading Chinese, so I'm still trying to translate the attached image found here). At first glance, however, the official guide seems to correspond with the Wikipedia article mentioned below...

For a more-concise summary of all these, see Wikipedia's article on addresses:

mparker17’s picture

FileSize
40.8 KB

A co-worker of mine translated the rest of the image for me (thanks! ^_^). Note that it's the format for national mail (sent within Taiwan).

The format is:

Postal code
City City district
Street Street section Street number
Person / company's name Optional salutation

The format for International mail is explained here.

carn1x’s picture

I would be happy to try and build a patch for Hong Kong, but is this already being worked on?

mparker17’s picture

@carn1x: please go ahead! I haven't had as much time to work on this as I would like, so anything you can do would be helpful!

carn1x’s picture

Ok, I'll have a go at it, will hopefully have something in a week or so.

EDIT: Actually I was preparing myself for something a bit more comprehensive, but really the only change HK needs is to have the Postal Code field removed.

rogical’s picture

Actually, It would be a great UX boost if using Province -> city -> county/district a 3 level hierarchical select.

Finally, user inputs the street, room, and phone.

drakon’s picture

Any updates on this? Still need the address fields corrected for Taiwan (ROC)!

Thanks!

edxxu’s picture

Subscribe!

edxxu’s picture

Status: Active » Needs review
FileSize
0 bytes

I made a plugin for China mainland address format, please review.

edxxu’s picture

FileSize
2.54 KB

Sorry the above patch is empty, re-upload the patch

rogical’s picture

git apply -v 1218304-11.patch
1218304-11.patch:35: trailing whitespace.

1218304-11.patch:41: trailing whitespace.

1218304-11.patch:44: trailing whitespace.

1218304-11.patch:48: trailing whitespace.

Checking patch plugins/format/chinese-simpilied.inc...
error: plugins/format/chinese-simpilied.inc: No such file or directory

But I solved it with 'touch plugins/format/chinese-simpilied.inc', and it works, nice work!

BTW, it would be perfect if we can dynamically select cities depend on province.
dd

MadGecko’s picture

I like it. Thanks a lot.

skyredwang’s picture

Status: Needs review » Reviewed & tested by the community

Pre-loading all the city names might be an overkill, and definitely much more work. We should commit this first for now.

edxxu’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-beta3
FileSize
3.03 KB

Please review.

rogical’s picture

Good news to see China address field, we may think that module as a optional module integration if user want to use.

Damien Tournoud’s picture

Status: Reviewed & tested by the community » Needs work

There are a couple of typos in this patch. Also, could we try to simplify this and merge it in address.inc?

We are going to need to refactor this module completely if we want it to stay maintainable... :(

rogical’s picture

I suggest to open a 2.x branch if refactor, as many people may already build their own plugin for this module.

willkaxu’s picture

Just modify some typos from the edx's patch "add_chinese_format_plugin-1218304-15.patch ". Here is the patch!

rogical’s picture

edxxu’s picture

Merge the chinese address plugin into address.inc, please review

edxxu’s picture

Status: Needs work » Needs review
j0rd’s picture

Issue tags: +pluggable regions

This is a duplicate of
#1829900: [meta] Address Field 2.x needs pluggable administrative areas and an actual API

If you think so to, please close your ticket.

rszrama’s picture

Component: User interface » Address formats
bojanz’s picture

Issue summary: View changes
Status: Needs review » Needs work

1) According to the Universal Postal Union and Google's dataset, the postal code is not optional, but required.
2) The administrative areas must be in pinyin chinese, keyed by iso codes. I've opened a separate issue that adds just them: #2389517: Add administrative areas for China.

The current addressfield code already adds a dependent_locality field for China, with the correct District label.

Sources:
http://www.upu.int/fileadmin/documentsFiles/activities/addressingUnit/ch...

bojanz’s picture

Title: The address setting for China is not suit to China » Make the postal code field optional for China
Status: Needs work » Active
FileSize
48.92 KB

The administrative areas have been added in #2389517: Add administrative areas for China.
I've also made tweaks to the field order.

Attaching the screenshot of the address form as rendered by the latest 7.x-1.x.

The remaining task is to make the postal code optional. The proof for that will be uploaded by skyredwang.

skyredwang’s picture

One more thing: Postal Code in China is not required by many people, maybe we can remove the requirement.

Based on my research:

Top 3 eCommerce sites in China: Taobao (Alibaba), YHD.com and XiaoMi (mi.com); Taobao and XiaoMi require postal codes, YHD doesn't require.

Top 3 Mail service providers in China: China Postal Express, S.F. Express, and Y.T. Express; they do not require postal codes.

I'd like to hear other Chinese developers' opinion on if we should remove postal code requirement as default.

Screenshots and proofs will be uploaded.

rszrama’s picture

Do you think they don't require it because they automatically look it up via some web service?

rogical’s picture

Not really, nowadays postal code isn't important in Commerce sites in China, packages can be delivered correctly without postal code. Usually, the site would automatically fill it when user input the address.

skyredwang’s picture

Status: Active » Needs review
FileSize
316.14 KB
382.52 KB
315.61 KB

I have attached 3 examples:

The 1st example is from China Postal Express https://www.drupal.org/files/issues/IMG_20150113_211412.jpg ; both the sender and the receiver's zipcode are empty (optional)

The 2nd example is from S.F. Express https://www.drupal.org/files/issues/IMG_20150113_211322.jpg ; there is no zipcode field

The 3rd example is from Y.T. Express https://www.drupal.org/files/issues/IMG_20150113_211352.jpg ; zipcode is not required

  • bojanz committed dbdf763 on 7.x-1.x
    Issue #1218304: Make the postal code field optional for China
    
bojanz’s picture

Status: Needs review » Fixed

Made the postal code field optional, thank you for the research.

Status: Fixed » Closed (fixed)

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

Graham Leach’s picture

2019-01-05:
========

Is there any way to have postal codes simply NOT appear if the country involved is Hong Kong?

In Hong Kong there are NO postal codes. Instead, there is a hierarchical, tiered addressing system that looks like this:

Address (Floor)
Village Name
District (there are 18)
Area (there are 3)
Hong Kong S.A.R.
China

Districts:

1. Islands
2. Kwai Tsing
3. North
4. Sai Kung
5. Sha Tin
6. Tai Po
7. Tsuen Wan
8. Tuen Mun
9. Yuen Long
10. Kowloon City
11. Kwun Tong
12. Sham Shui Po
13. Wong Tai Sin
14. Yau Tsim Mong
15. Central & Western
16. Eastern
17. Southern
18. Wan Chai

Areas:

A. Hong Kong Island
B. Kowloon
C. New Territories