You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why does SILE have the 3 "hacks" SU.formatNumber.en, SU.formatNumber.tr, SU.formatNumber.eo (with methods such as nth(), string() etc.) - not covering many languages, thus - while it also has ICU (via the "justenoughicu" wrapper to Lua) and could cover, with little efforts, a whole lot of languages with less ad hoc coding?
> print(icu.format_number_ext(1984, "sr-Cyrl", 5)) -- једна хиљаду деветсто осамдесет и четири
> print(icu.format_number_ext(1984, "sr-Latn", 5)) -- jedna hiljadu devetsto osamdeset i četiri
Was there a good rationale not using ICU, and having those above-mentioned limited language hooks?
If not, should I make a PR?
EDIT: Of course eventually to unleash the power of the beast, we'd need using locales instead of the current use-my-country-code-as-a-language...
The text was updated successfully, but these errors were encountered:
Omikhleia
changed the title
Number formatting in foreign language
Number formatting in foreign languages
Nov 26, 2022
I think there was a good reason for not using ICU, but it no longer applies. Those hacks predate having the full ICU module as a dependency and have just kind of grown along with the source even since it's been available for a long time. There is no sane reason not to use it now.
Why does SILE have the 3 "hacks"
SU.formatNumber.en
,SU.formatNumber.tr
,SU.formatNumber.eo
(with methods such asnth()
,string()
etc.) - not covering many languages, thus - while it also has ICU (via the "justenoughicu" wrapper to Lua) and could cover, with little efforts, a whole lot of languages with less ad hoc coding?Just playing 5mn with ICU...
Or for useful purposes, not doubts 😁 :
No, seriously:
Was there a good rationale not using ICU, and having those above-mentioned limited language hooks?
If not, should I make a PR?
EDIT: Of course eventually to unleash the power of the beast, we'd need using locales instead of the current use-my-country-code-as-a-language...
The text was updated successfully, but these errors were encountered: