-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with currency symbols #14
Comments
I 👍 both 😉 |
maybe introducing a |
any progress? |
Yes, I've prepared myself mentally for this task 😸 Please give me few more days, I've been extremely busy this week. |
ok 😄 it was just to know, no worry 😄 |
Sorry to be pushy, but any news here? (it's just that I am super curious to read your implementation 😄 ) |
@lukaszkrawczyk any progress? |
I guess sames thing is for In Russia there are two often used $ symbols:
Same in Ukraine:
Besides, in some cases users may want to display ISO 4217 code:
Just for the note, symbols and shortened versions in Russia and Ukraine do not depend on number in any way, it's always same. Maybe we can have somehow more flexible way to configure possible formats for different languages? |
Hello! |
sounds like a good idea 😄 I think moment has a similar feature |
Here is something more to consider http://www.gnu.org/software/libc/manual/html_node/Locale-Names.html#Locale-Names:
GNU locales have You can see as in example they denote with Besides, with such helper we would be able to call certain |
Regarding issue #2 (number formatting in various "exotic" languages), we've got two additional problems:
Multiple currency symbols
In Japanese (and Chinese) prices can be formatted in two ways
in Chinese it's ¥ and 元 respectively
Used symbol mainly depends on context, but important thing is that both are commonly used.
Although we can choose place of currency symbol in
format()
function, we can't change it's style (choose symbol we prefer to use).@BenjaminVanRyseghem had an idea we could introduce additional parameter to language configuration file called
translatedSymbol
. If this symbol is not defined, we fallback tocurrencySymbol
.Centesimal division
Several currencies in the world using separate symbol for centisimal division of the currency.
For example, in Poland main currency is called zloty and the international symbol of this currency is "zł".
1 zloty (1 zł) is divided into 100 grosz (100 gr), so prices are usually formatted in following way:
50.99 becomes 50zł 88gr.
Problem applies also to dollars & cents, punds & pennies, euro & cents and several other currencies so I think it would be nice to have such functionality.
One idea is to add additional parameter to currency symbol called "c" ("centisimal"):
I know it may looks little wierd, but on the other hand it lets user define formatting in more flexible way (to use space between currency and centisimal symbol or not).
What do you guys think about that?
The text was updated successfully, but these errors were encountered: