-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kazakhstan address format #203
Comments
Indeed, the postal code comes first in the address format:
This is highly unusual, most address formats aren't like that. Looks like we imported it like that from Google's address data service. We can change it to something more sensible, but we need an authoritative source, such as a kazpost link. If kazpost has no resource that we can reference, we can fall back to UPU's rules, which also list the postalCode as standing next to the locality, after the address lines. Looks like we also need to update the postal code pattern, as UPU says it's 7 alphanumeric characters, not 6 digits. |
@mattarmitage How does this sound:
It changes the used layout, makes the postalCode required, and uses a format of 7 alphanumeric characters. It changes the administrative area label from "state" to "region". We also need to add a list of regions. I was thinking of using the English names from https://en.wikipedia.org/wiki/Regions_of_Kazakhstan as the default + the latin Kazakh names (e.g. "Abai oblysy") when the language code is The alternative would be to use the Kazakh names as the default + the Russian names when the language code is "ru", but the English names feel easier to understand to foreigners. |
Well. The problem is that many places in Kazakhstan still use the old 6
digit numerical postcode. So that may cause problems.
It apparently takes a while for things to happen in Kazakhstan.
…On Thu, 23 Nov 2023, 22:43 Bojan Zivanovic, ***@***.***> wrote:
@mattarmitage <https://github.com/mattarmitage> How does this sound:
'KZ' => [
'format' => "%familyName %givenName %additionalName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%postalCode, %locality\n%administrativeArea",
'required_fields' => [
'addressLine1', 'locality', 'postalCode',
],
'postal_code_pattern' => '[A-Z0-9]{7}',
],
It changes the used layout, makes the postalCode required, and uses a
format of 7 alphanumeric characters.
—
Reply to this email directly, view it on GitHub
<#203 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLUUVK43NTTDKJDXPYLIV3YF67NZAVCNFSM6AAAAAA7YACDJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUHEZTOOJWGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Okay, let's go with I've also edited my comment above to ask about the regions, please let me know. |
The regions are beyond my knowledge! They would be good additions though. |
I spoke with some Kazakhs and they said the weird format was a soviet Russian thing and it has been standardised now to match global standards but basically everyone uses all kinds of formats there. |
Great, pushed a commit that reworks the address format. I am still waiting on feedback regarding the region names, once I have that I will commit the regions too and report back here. We can then tag a new release. |
Opened #204 to track adding the regions. |
I am using the Address module in Drupal 9 which relies on the formatting in this library. When selecting Kazakhstan as country the format is changed but I do not think it is correct as it puts the postal code first.
![Screenshot_20231123_170208_Chrome~2.jpg](https://private-user-images.githubusercontent.com/14109269/285263327-bea9ac41-70cc-43da-96ed-b234b13dd81d.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMzI4ODEsIm5iZiI6MTcyNjEzMjU4MSwicGF0aCI6Ii8xNDEwOTI2OS8yODUyNjMzMjctYmVhOWFjNDEtNzBjYy00M2RhLTk2ZWQtYjIzNGIxM2RkODFkLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA5MTYyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZhYzg3Zjg4YzZhYTJmMWU4NWQzOTIwNTE4YjY2MjE0MTA1YmY3NzNkZWEwMTBiYjdlZWVmNWRhY2QyNTQ1ZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hnTG5mhe2Xj1HU-273XTdixI9UZgxlimB0sbhAHroJU)
I've done some research and I don't see why the format is set in this order. I see some difference in the order if the address is in cyrillic format, but not identical to what is being enforced, and this shouldn't be a default anyway.
Attached an example of the order it appears in Drupal 9 for Kazakhstan.
The text was updated successfully, but these errors were encountered: