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

**URL:** <https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203>\
**Category:** Foundation\
**Tags:** foundation, pitch, foundation-pitch\
**Created:** [November 24, 2024, 11:15pm UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203 "2024-11-24T23:15:53Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![tinaliu](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/tinaliu/32/20927_2.png) [@tinaliu](https://forums.swift.org/u/tinaliu)\
**Post date:** [December 12, 2024, 5:23pm UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/23 "2024-12-12T17:23:57Z")

</div>

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](https://www.unicode.org/cldr/charts/46/supplemental/locale_coverage.html#main_table) would be a reasonable parallel.

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

```swift
["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".

---

<div class="post-metadata">

**Author:** ![YOCKOW](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/yockow/32/20636_2.png) [@YOCKOW](https://forums.swift.org/u/YOCKOW)\
**Post date:** [February 15, 2025, 1:41am UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/24 "2025-02-15T01:41:39Z")

</div>

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:

- [CLDR-11819 "Use 元年 for the first year of Japanese calendar era by default"](https://unicode-org.atlassian.net/browse/CLDR-11819)
- [CLDR-11843 "Add new jpanyear numbering system"](https://unicode-org.atlassian.net/browse/CLDR-11843#icft=CLDR-11843)
- [CLDR-11843 have jpanyear use new ja/spellout-numbering-year-latn to g… · unicode-org/cldr@32ea784 · GitHub](https://github.com/unicode-org/cldr/commit/32ea7842b3c2c811f87e164ef4d4ae4609ff415e)

---

<div class="post-metadata">

**Author:** ![xwu](https://avatars.discourse-cdn.com/v4/letter/x/b487fb/32.png) [@xwu](https://forums.swift.org/u/xwu)\
**Post date:** [February 15, 2025, 3:19pm UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/25 "2025-02-15T15:19:45Z")

</div>

> [@YOCKOW](#):
>
> 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年, ...".

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](https://learn.microsoft.com/en-us/troubleshoot/developer/dotnet/framework/installation/new-japanese-era-updates):

> 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").

---

<div class="post-metadata">

**Author:** ![YOCKOW](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/yockow/32/20636_2.png) [@YOCKOW](https://forums.swift.org/u/YOCKOW)\
**Post date:** [February 16, 2025, 8:59am UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/26 "2025-02-16T08:59:54Z")

</div>

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(🙇‍♂️) 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)

---

<div class="post-metadata">

**Author:** ![treastrain](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/treastrain/32/41319_2.png) [@treastrain](https://forums.swift.org/u/treastrain)\
**Post date:** [February 16, 2025, 10:48am UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/27 "2025-02-16T10:48:40Z")

</div>

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](https://swiftdevelopers.jp) ([Discord](https://discord.com/channels/291054398077927425/291054454793306112/1340639704034447380)). I'm sure that interested friends will comment on this in this forum!

---

<div class="post-metadata">

**Author:** ![treastrain](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/treastrain/32/41319_2.png) [@treastrain](https://forums.swift.org/u/treastrain)\
**Post date:** [February 16, 2025, 12:01pm UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/28 "2025-02-16T12:01:30Z")

</div>

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 "令和元年".

---

<div class="post-metadata">

**Author:** ![rintaro](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/rintaro/32/568_2.png) [@rintaro](https://forums.swift.org/u/rintaro)\
**Post date:** [February 16, 2025, 1:35pm UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/29 "2025-02-16T13:35:54Z")

</div>

+1 for `japaneseCalendarYear`

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

> [@xwu](#):
>
> 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").

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

---

<div class="post-metadata">

**Author:** ![ktoso](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ktoso/32/44526_2.png) [@ktoso](https://forums.swift.org/u/ktoso)\
**Post date:** [February 17, 2025, 10:58am UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/30 "2025-02-17T10:58:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![YOCKOW](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/yockow/32/20636_2.png) [@YOCKOW](https://forums.swift.org/u/YOCKOW)\
**Post date:** [February 23, 2025, 1:30am UTC](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203/31 "2025-02-23T01:30:25Z")

</div>

I appreciate every response to my brusque call.

💭 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?

[Previous page](https://forums.swift.org/t/pitch-add-static-properties-for-locale-numberingsystem/76203.md?page=1)
