Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#30 | IMG_20150113_211412.jpg | 315.61 KB | skyredwang |
#30 | IMG_20150113_211322.jpg | 382.52 KB | skyredwang |
#30 | IMG_20150113_211352.jpg | 316.14 KB | skyredwang |
#26 | china-format.png | 48.92 KB | bojanz |
#21 | chinese_style_addressfield-1218304-21.patch | 2.45 KB | edxxu |
Comments
Comment #1
mparker17Subscribe!
Comment #2
mparker17To 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:
Comment #3
mparker17A 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:
The format for International mail is explained here.
Comment #4
carn1x CreditAttribution: carn1x commentedI would be happy to try and build a patch for Hong Kong, but is this already being worked on?
Comment #5
mparker17@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!
Comment #6
carn1x CreditAttribution: carn1x commentedOk, 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.
Comment #7
rogical CreditAttribution: rogical commentedActually, 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.
Comment #8
drakon CreditAttribution: drakon commentedAny updates on this? Still need the address fields corrected for Taiwan (ROC)!
Thanks!
Comment #9
edxxu CreditAttribution: edxxu commentedSubscribe!
Comment #10
edxxu CreditAttribution: edxxu commentedI made a plugin for China mainland address format, please review.
Comment #11
edxxu CreditAttribution: edxxu commentedSorry the above patch is empty, re-upload the patch
Comment #12
rogical CreditAttribution: rogical commentedgit 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.
Comment #13
MadGecko CreditAttribution: MadGecko commentedI like it. Thanks a lot.
Comment #14
skyredwangPre-loading all the city names might be an overkill, and definitely much more work. We should commit this first for now.
Comment #15
edxxu CreditAttribution: edxxu commentedPlease review.
Comment #16
rogical CreditAttribution: rogical commentedGood news to see China address field, we may think that module as a optional module integration if user want to use.
Comment #17
Damien Tournoud CreditAttribution: Damien Tournoud commentedThere 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... :(
Comment #18
rogical CreditAttribution: rogical commentedI suggest to open a 2.x branch if refactor, as many people may already build their own plugin for this module.
Comment #19
willkaxu CreditAttribution: willkaxu commentedJust modify some typos from the edx's patch "add_chinese_format_plugin-1218304-15.patch ". Here is the patch!
Comment #20
rogical CreditAttribution: rogical commentedGood news http://drupal.org/project/China_address_field
Comment #21
edxxu CreditAttribution: edxxu commentedMerge the chinese address plugin into address.inc, please review
Comment #22
edxxu CreditAttribution: edxxu commentedComment #23
j0rd CreditAttribution: j0rd commentedThis 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.
Comment #24
rszrama CreditAttribution: rszrama commentedComment #25
bojanz CreditAttribution: bojanz commented1) 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...
Comment #26
bojanz CreditAttribution: bojanz commentedThe 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.
Comment #27
skyredwangOne 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.
Comment #28
rszrama CreditAttribution: rszrama commentedDo you think they don't require it because they automatically look it up via some web service?
Comment #29
rogical CreditAttribution: rogical commentedNot 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.
Comment #30
skyredwangI 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
Comment #32
bojanz CreditAttribution: bojanz commentedMade the postal code field optional, thank you for the research.
Comment #34
Graham Leach CreditAttribution: Graham Leach commented2019-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