OpenCageData / address-formatting

templates to format geographic addresses
MIT License
394 stars 84 forks source link

China locale support #94

Closed Ivan-Mak closed 1 year ago

Ivan-Mak commented 1 year ago

As per all the other countries who support different locales (HK, JP, ..), the default value is always addresses with Latin format.

freyfogle commented 1 year ago

Hi, thanks for contributing. You make a fair point that we should have consistency. Probably we should default to the local language. (ie jp in JP, zh in CN). I guess the question then is how to treat places with multiple languages like HK. But regardless, you broke the tests.

Will think about this a bit more

Ivan-Mak commented 1 year ago

Probably we should default to the local language. (ie jp in JP, zh in CN)

Would make sense to default to locale language and have a "latin / en" option for ASPAC (or others) countries using non Latin format. Happy to revert the China to Chinese default and only keep english as a second option HK is 90% Cantonese speakers so that should probably be the default in that case.

But regardless, you broke the tests.

Apologies. Was a little too fast on the new PR. Should have run tests locally.. Lazy me..

freyfogle commented 1 year ago

Yes, let's do that - default should be the local language and en as option (since we already have used "en" let's stick with that over "latin") that makes the most sense.

re: HK, yes I know most people speak Cantonese, but my understanding is most addresses are given in English, and, unlike the other countries, English is an official language. That said I freely admit I have no local knowledge, having been their only once and very briefly.

Anyway, looking at the conf file I think we should change the way we do things. Right now we have three entries for these countries, for example TW, TW_en, and, TW_zh and each is defined. We should only define TW_en and TW_zh and TW should just point to TW_zh

I will make this change in the coming days.

Ivan-Mak commented 1 year ago

I changed back to default with Chinese and added English support. I will check other countries to see if we need English or other language support as well.

Anyway, looking at the conf file I think we should change the way we do things. Right now we have three entries for these countries, for example TW, TW_en, and, TW_zh and each is defined. We should only define TW_en and TW_zh and TW should just point to TW_zh

Agreed, that would be a good cleanup.

freyfogle commented 1 year ago

nice, thanks. Ok I will make that change in the coming days.

Thanks for your help