Skip to content
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

Flag deprecated currencies in the bundled ICU data, filter them out by default #11886

Closed
bojanz opened this issue Sep 9, 2014 · 20 comments
Closed

Comments

@bojanz
Copy link

bojanz commented Sep 9, 2014

Another issue related to #9206 and #11884.

CLDR has an interesting inconsistency, it doesn't include deprecated/dissolved countries (like Yugoslavia, Czechoslovakia, etc), but it includes exactly 139 deprecated currencies.

This makes the shipped currency list very impractical for ecommerce purposes, since the dropdown offered to the user/admin includes 139 irrelevant entries.
For example, 5 yugoslavian dinars (Yugoslavia dissolved 20 years ago), several currencies that were only used in the 1992-1995 wars, etc.
It also increases the size of the shipped data, since those 139 entries also have translations in every locale.

The ISO list of currencies doesn't include deprecated currencies, so I suggest flagging any CLDR currencies not present in the ISO list as "deprecated", and updating the listing methods to not return deprecated currencies by default.

@stof
Copy link
Member

stof commented Sep 9, 2014

Let's wait for #11884 first to solve this in the new codebase rather than the current one

@bojanz
Copy link
Author

bojanz commented Sep 9, 2014

Yes, I'm discussing this in the context of the new API (following a discussion with webmozart).

@javiereguiluz
Copy link
Member

Beware that in Europe most countries switched to Euro currency a few years ago but their national currencies are still widely used, mostly to show conversions. Are these old national currencies also considered deprecated?

@bojanz
Copy link
Author

bojanz commented Sep 9, 2014

Yes they are, and that is a good point (showing the need for a deprecated flag instead?)

@mvrhov
Copy link

mvrhov commented Sep 9, 2014

Yeah, they should only be marked as deprecated and not removed. Otherwise when the currencies change e.g new country adopts euro. You are unable to display old invoices correctly as the currency is gone.

@bojanz bojanz changed the title Don't include deprecated currencies in the bundled ICU data Flag deprecated in the bundled ICU data, filter them out by default Sep 9, 2014
@bojanz bojanz changed the title Flag deprecated in the bundled ICU data, filter them out by default Flag deprecated currencies in the bundled ICU data, filter them out by default Sep 9, 2014
@bojanz
Copy link
Author

bojanz commented Sep 9, 2014

Agreed, updated the issue title and text. Thank you for your comments.

@javiereguiluz
Copy link
Member

@jakzal as you have updated ICU/CLDR data lots of times, I'd like to ask you if you think this is doable without too much effort. In this page http://cldr.unicode.org/translation/currency-names it explains that:

A currency is current if it has "∞" in the To column for some country.

So it should be easy to differentiate between current and non-current currencies. But I don't know if it's easy to translate that into Symfony. Thanks!

@jakzal
Copy link
Contributor

jakzal commented Jul 26, 2018

@stof
Copy link
Member

stof commented Jul 26, 2018

@jakzal then we might need to get the CLDR data directly to read this info: https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/currencyData.json

@stof
Copy link
Member

stof commented Jul 26, 2018

note that in the JSON file, the to is omitted rather than set to

@stof
Copy link
Member

stof commented Jul 26, 2018

and here is the HTML page corresponding to the dead link in the page given by @javiereguiluz: https://www.unicode.org/cldr/charts/34/supplemental/detailed_territory_currency_information.html

@pawelabrams
Copy link

I'll up this, as there's definitely a case in here for e-commerce applications – we're developing a multinational platform and need to be able to service customers from any country we can.

To help, there's also a set of data inside the ICU itself:
https://github.com/unicode-org/icu/blob/76168dae661d2092d21128f3aa1c2c3c84c2063c/icu4c/source/data/curr/supplementalData.txt

The to field seems to be what we're talking about, but it's also a chilling reminder that the currency transitions are not that clean. The list is sorted by country code; we would need to parse every entry on that list and check if every country phased out the currency. If there's a scheduled phase out date, we should also check if the to date isn't in the future.

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@pawelabrams
Copy link

Well, yes, Mr. Bot, I would really like to see it. Creating blacklist of outdated currencies is not an easy job :)

@carsonbot carsonbot removed the Stalled label Dec 18, 2020
@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@pawelabrams
Copy link

Bump, thank you and your maker, bot.

What's the procedure here? Should I prepare a POC of sorts?

@carsonbot carsonbot removed the Stalled label Jun 21, 2021
@derrabus
Copy link
Member

If you can work on a PR, don't hesitate to do so!

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@carsonbot
Copy link

Hello? This issue is about to be closed if nobody replies.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants