Comments

Georgique’s picture

Georgique’s picture

Status: Active » Needs review
bojanz’s picture

Status: Needs review » Needs work

We need to use the ISO codes as the array keys, see https://en.wikipedia.org/wiki/ISO_3166-2:KZ
For example ('ALA' => t('Almaty')).

Which source are you using for the province names? It looks odd to have the word "province" appended to the names.

Georgique’s picture

@bojanz I will rework my patch tomorrow for ISO codes.
About "province" appended:
1. This word is always appended officially in Kazakh and Russian names of provinces. You can see it in Wikipedia (your link) word "oblast'" - this translates as area or province.
Provinces in KZ are 3 types:
1. Almaty/Astana - two biggest cities. They are not parts of any provinces so are considered as provinces themselves.
2. Geographic placement. North-Kazakhstan province, South-Kazakhstan province, etc.
3. Province named after the biggest city in it. Karaganda province, Atyrau province.
Name of province is not a noun but an adjective in Kazakhstan. But when we have a label "Province" before the field, it will not be odd if we remove "province" word.
We have 3 ways:
1. Leave "province"
2. Rename "province" to "state" or "region". I'm not sure what is better, will ask Kazpost for official info about it.
3. Remove "province"
I've described situation as detailed as I could, now choose. :)

bojanz’s picture

Okay, sounds like we should leave province then.

Georgique’s picture

Status: Needs work » Needs review
StatusFileSize
new1.74 KB

Kazpost sais that "region" is the right word for Kazakhstan administrative area.
Changed codes to ISO and renamed "province" to "region".

bojanz’s picture

Status: Needs review » Needs work

I've looked into this.

The way we currently define administrative areas for Russia and Ukraine is to give a transcription of the original, not a translation (so "oblast" not "region" , "zapadno" instead of "west", etc).

   $administrative_areas['UA'] = array(
    '43' => t('Crimea'),
    '05' => t('Vinnyts\'ka oblast'),
    '07' => t('Volyns\'ka oblast'),
    '12' => t('Dnipropetrovsk Oblast'),
    '14' => t('Donetsk Oblast'),
    '18' => t('Zhytomyrs\'ka oblast'),
    '21' => t('Zakarpats\'ka oblast'),
    '23' => t('Zaporiz\'ka oblast'),
    '26' => t('Ivano-Frankivs\'ka oblast'),
    '30' => t('Kyiv city'),
    '30' => t('Kiev Oblast'),
    '35' => t('Kirovohrads\'ka oblast'),
    '09' => t('Luhans\'ka oblast'),
    '46' => t('Lviv Oblast'),
    '48' => t('Mykolaivs\'ka oblast'),
    '51' => t('Odessa Oblast'),
    '53' => t('Poltavs\'ka oblast'),
    '56' => t('Rivnens\'ka oblast'),
    '40' => t('Sevastopol\' city'),
    '59' => t('Sums\'ka oblast'),
    '61' => t('Ternopil\'s\'ka oblast'),
    '63' => t('Kharkiv Oblast'),
    '65' => t('Khersons\'ka oblast'),
    '68' => t('Khmel\'nyts\'ka oblast'),
    '71' => t('Cherkas\'ka oblast'),
    '77' => t('Chernivets\'ka oblast'),
    '74' => t('Chernihivs\'ka oblast'),
  );
  $administrative_areas['RU'] = array(
    'MOW' => t('Moskva'),
    'SPE' => t('Sankt-Peterburg'),
    'AD' => t('Adygeya, Respublika'),
    'AL' => t('Altay, Respublika'),
    'BA' => t('Bashkortostan, Respublika'),
    'BU' => t('Buryatiya, Respublika'),
    'CE' => t('Chechenskaya Respublika'),
    'CU' => t('Chuvashskaya Respublika'),
    'DA' => t('Dagestan, Respublika'),
    'IN' => t('Ingushetiya, Respublika'),
    'KB' => t('Kabardino-Balkarskaya Respublika'),
    'KL' => t('Kalmykiya, Respublika'),
    'KC' => t('Karachayevo-Cherkesskaya Respublika'),
    'KR' => t('Kareliya, Respublika'),
    'KK' => t('Khakasiya, Respublika'),
    'KO' => t('Komi, Respublika'),
    'ME' => t('Mariy El, Respublika'),
    'MO' => t('Mordoviya, Respublika'),
    'SA' => t('Sakha, Respublika [Yakutiya]'),
    'SE' => t('Severnaya Osetiya-Alaniya, Respublika'),
    'TA' => t('Tatarstan, Respublika'),
    'TY' => t('Tyva, Respublika [Tuva]'),
    'UD' => t('Udmurtskaya Respublika'),
    'ALT' => t('Altayskiy kray'),
    'KAM' => t('Kamchatskiy kray'),
    'KHA' => t('Khabarovskiy kray'),
    'KDA' => t('Krasnodarskiy kray'),
    'KYA' => t('Krasnoyarskiy kray'),
    'PER' => t('Permskiy kray'),
    'PRI' => t('Primorskiy kray'),
    'STA' => t('Stavropolskiy kray'),
    'ZAB' => t('Zabaykalskiy kray'),
    'AMU' => t('Amurskaya oblast'),
    'ARK' => t('Arkhangelskaya oblast'),
    'AST' => t('Astrakhanskaya oblast'),
    'BEL' => t('Belgorodskaya oblast'),
    'BRY' => t('Bryanskaya oblast'),
    'CHE' => t('Chelyabinskaya oblast'),
    'IRK' => t('Irkutskaya oblast'),
    'IVA' => t('Ivanovskaya oblast'),
    'KGD' => t('Kaliningradskaya oblast'),
    'KLU' => t('Kaluzhskaya oblast'),
    'KEM' => t('Kemerovskaya oblast'),
    'KIR' => t('Kirovskaya oblast'),
    'KOS' => t('Kostromskaya oblast'),
    'KGN' => t('Kurganskaya oblast'),
    'KRS' => t('Kurskaya oblast'),
    'LEN' => t('Leningradskaya oblast'),
    'LIP' => t('Lipetskaya oblast'),
    'MAG' => t('Magadanskaya oblast'),
    'MOS' => t('Moskovskaya oblast'),
    'MUR' => t('Murmanskaya oblast'),
    'NIZ' => t('Nizhegorodskaya oblast'),
    'NGR' => t('Novgorodskaya oblast'),
    'NVS' => t('Novosibirskaya oblast'),
    'OMS' => t('Omskaya oblast'),
    'ORE' => t('Orenburgskaya oblast'),
    'ORL' => t('Orlovskaya oblast'),
    'PNZ' => t('Penzenskaya oblast'),
    'PSK' => t('Pskovskaya oblast'),
    'ROS' => t('Rostovskaya oblast'),
    'RYA' => t('Ryazanskaya oblast'),
    'SAK' => t('Sakhalinskaya oblast'),
    'SAM' => t('Samarskaya oblast'),
    'SAR' => t('Saratovskaya oblast'),
    'SMO' => t('Smolenskaya oblast'),
    'SVE' => t('Sverdlovskaya oblast'),
    'TAM' => t('Tambovskaya oblast'),
    'TOM' => t('Tomskaya oblast'),
    'TUL' => t('Tulskaya oblast'),
    'TVE' => t('Tverskaya oblast'),
    'TYU' => t('Tyumenskaya oblast'),
    'ULY' => t('Ulyanovskaya oblast'),
    'VLA' => t('Vladimirskaya oblast'),
    'VGG' => t('Volgogradskaya oblast'),
    'VLG' => t('Vologodskaya oblast'),
    'VOR' => t('Voronezhskaya oblast'),
    'YAR' => t('Yaroslavskaya oblast'),
    'YEV' => t('Yevreyskaya avtonomnaya oblast'),
    'CHU' => t('Chukotskiy avtonomnyy okrug'),
    'KHM' => t('Khanty-Mansiyskiy avtonomnyy okrug-Yugra'),
    'NEN' => t('Nenetskiy avtonomnyy okrug'),
    'YAN' => t('Yamalo-Nenetskiy avtonomnyy okrug'),
  );

So, let's follow the same approach with Kazakhstan.

Georgique’s picture

Reasonable.
But as you could see there are two administrative language in Kazakhstan: Kazakh (primary) and Russian (secondary). In Kazakh "region" is "oblysy" and in Russian -- "oblast'". When we look at https://en.wikipedia.org/wiki/ISO_3166-2:KZ we see that "region" is translatable. So I suggest to continue calling it "region" in addressfield.
But region name should be set transliterated kazakh version.
Any cons? If no, I will rework the patch.

bojanz’s picture

But the region name also exists in kazakh and russian versions, so doesn't it make more sense to go with the full kazakh ISO version (for example "Batys Qazaqstan oblysy"), then use t() to translate into russian?

Georgique’s picture

For sure there will be no problems with Kazakh and Russian translations of regions.
But in English it will sound not good. Don't you think that "West Kazakhstan" is much more understandable then "Batys Qazaqstan"? I'm just trying to find way to make region's names clear for all languages. :)

bojanz’s picture

Well, almost no administrative area is actually translated into English, because most names have no English equivalent. You generally offer the original name because it's assumed that's what people who are entering the address are familiar with.

Georgique’s picture

Yes, sure. I just gave wrong example. "Region" is more understandable than "oblysy". That's why I suggest to leave it for English.

Georgique’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

One more argument - "region" addition is used only for differing regions from two major cities with same names. That is the reason why it is translatable in KK vs RU, that should be also a reason for translating it to english "region".
I've reworked names, attaching patch.

bojanz’s picture

Okay, we're almost there.

1) Does it matter for english speakers, if Region is the label of the field itself?
2) Doesn't #13 mean that you need to translate the names into both Kazakh and Russian, instead of just Russian?

Georgique’s picture

1. How you will differentiate major cities from regions otherwise?
2. For sure we will need. But #13 doesn't mean that. In original (English) region names are anyway written using latin characters, in Kazakh we will need cyrillic ones.

bojanz’s picture

Status: Needs review » Fixed

Okay, committed. Thanks!

  • bojanz committed 8acc6c9 on 7.x-1.x authored by Georgique
    Issue #2398697 by Georgique: Add administrative areas for Kazakhstan
    

Status: Fixed » Closed (fixed)

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