[Pitch] Add static properties for `Locale.NumberingSystem`

This list was taken from the list of locales used by known Darwin clients at the time when it was introduced. It was a limited set because we were able to verify that all of those would be supported by Darwin apps and frameworks.

Of course that criteria would not make the most sense now, but I wonder if a list that covers common use cases such as the CLDR one you linked would be a reasonable parallel.

These are the available numbering systems of those locales. There are 37 of them:

["thai", "gujr", "hant", "adlm", "ethi", "grek", "hanidec", "deva", "armn", "geor", "jpanfin", "telu", "hansfin", "hantfin", "hebr", "hans", "java", "tibt", "guru", "tamldec", "knda", "olck", "jpan", "mymr", "beng", "mtei", "orya", "laoo", "latn", "taml", "arabext", "cakm", "mlym", "khmr", "arab", "nkoo", "vaii"]

I noticed that type setting ones aren't included here, but certain purpose ones are such as "hantfin".

I hope it's not too late.
As a native Japanese speaker, I feel uneasy about japaneseGannen.
I personally prefer japaneseCalendarYear to it because jpanyear means that "the first year of the Japanese calendar era is called 元年(gan-nen), but the rest are called as usual; 2年, 3年, 4年, ...".

References:

1 Like

This is interesting to hear from a native Japanese speaker perspective.

I had understood japaneseGannen to be more precise in this respect because this numbering system specifically uses 元年 (gannen) for the first year of the era, as opposed to 1 年 (ichinen). For example, see the following .NET documentation:

By default, .NET adopts the Gannen (元年) convention in formatting operations.

Thus, naming the property japaneseYear or japaneseCalendarYear would obscure whether the first year of the era is 元年 or 1 年, whereas japaneseGannen is unambiguous in this respect (that is, it clearly "adopts the gannen convention").

Hmm. We, Japanese, usually say 元年 in the context of the conjunction with Japanese era names without referring to any conventions. In other words, we generally recognize that Japanese calendar year starts with 元年.
I think that's the reason why "Gannen convention" (which I've never heard as a jargon before) is default behavior (of course, on macOS too), and the reason why I thought japaneseCalendarYear would suffice.
I don't mean we never say 1年(1-nen) for the first year of the Japanese calendar era, though.

(As an aside, "Japanese Gannen" sounds like "The beginning of Japan" to me because 元年 is also figuratively used as the time of the beginning of remarkable junctures.)

Anyway, while I'm a native Japanese speaker, I'm not an expert in Japanese nor in Japanese calendar. I'd like to hear others' opinions.
So, please forgive me for being rudely(:bowing_man:) tagging people who I guess can speak Japanese: @ensan-hcl @Joe_Groff @kateinoigakukun @kishikawakatsumi @koher @ktoso @nh7a @NiwakaDev @noppefoxwolf @norio_nomura @omochimetaru @rintaro @SatoTakeshiX @shiz @treastrain @YoshihiroUnno @yossan @yusukeito @yutailang0119 (alphabetical order; of course, not exhaustive)

5 Likes

Thank you for mentionsing us. I will share about this topic with the community of Swift developers in Japan.

[Updated] I shared it here: https://swiftdevelopers.jp (Discord). I'm sure that interested friends will comment on this in this forum!

I'm also a native speaker of Japanese. In natural Japanese usage, "令和元年 (Reiwa gan-nen; Reiwa is the current Japanese era name)" is more common than "令和1年 (Reiwa ichi-nen)" when referring to the Japanese era name and the number of years.

I think that "1年 (ichi-nen)" is used only under limited conditions, such as when only integer can be used.

Therefore, there is no need to include "元年 (gan-nen)" in the property name, and it seems natural to just name the property japaneseCalendar or japaneseCalendarYear to output "令和元年".

5 Likes

+1 for japaneseCalendarYear

I've never considered 元年 as a numbering system, but it's just a number in the system.

Unambiguity is nice, but it's still ambiguous whether it produces 元, 二, 三, 四, ... or 元 2, 3, 4, 5 ... .

5 Likes

That's quite an interesting topic!

I'm nowhere near native speaker nor language authority, but I have seen the 元年 system in use indeed...

For what it's worth "japaneseCalendarYear" seems pretty clear though...

The "Gannen" spelled out like that might be kindof weird I think though?

Japanese speakers would not really encounter this word in romaji (roman alphabet transliteration), and to non-japanese speakers the word "gannen" doesn't really mean anything... so perhaps just "japanese calendar" is right as it is more universally understood -- and the docs can then explain that it's going to use that for the first year to make it absolutely clear.

4 Likes

I appreciate every response to my brusque call.

:thought_balloon: By the way, I suppose that this may be an example which implies difficulty in reviewing APIs in regard to internationalization. Personally speaking, I can bike-shed review Japan things in this way, but it's difficult to review other things related to specific countries/nations/cultures which I don't know. Although I believe here are various specialists in various areas, I'm concerned that some i18n issues might be sometimes passed over on the ground that only a few (or no) folks are familiar with them. I wonder how the community can/should reach out folks who know about such little-known i18n. Am I too worried?

3 Likes