github-readme-streak-stats icon indicating copy to clipboard operation
github-readme-streak-stats copied to clipboard

using arabic

Open MohcineDev opened this issue 1 year ago • 4 comments

why don't use Arabic numbers on Local = (ar)

MohcineDev avatar Nov 23 '23 22:11 MohcineDev

It does use numerals from Arabic locale

DenverCoder1 avatar Nov 23 '23 22:11 DenverCoder1

but those numbers are not arabic

MohcineDev avatar Nov 23 '23 23:11 MohcineDev

I think he means Western Arabic numerals with Arabic script

  • Western Arabic numerals as in (0,1,2,3,4,5,6,7,8,9)

As opposed to

  • Eastern Arabic numerals (Ù  Ù¡ Ù¢ Ù£ Ù¤ Ù¥ Ù¦ Ù§ Ù¨ Ù©)

J43fura avatar Dec 04 '23 22:12 J43fura

The code currently uses the default PHP NumberFormatter to automatically format the numbers based on the locale passed in the locale parameter. So if locale is set to ar, it will tell PHP to format numbers according to how it determines Arabic formats numbers. There is not currently a way to use the translations without also affecting number formats and default date formats at the same time.

A possible feature idea could be to add parameters for the "number locale", "day of week locale", "date format locale", "translation locale" as necessary and of course the existing locale parameter would set all of them, but the specific parameters could be used to override the locale, for example, number_locale=en to use western style numerals instead of the default Arabic numerals.

DenverCoder1 avatar Dec 04 '23 23:12 DenverCoder1