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
Comments
Let's wait for #11884 first to solve this in the new codebase rather than the current one |
Yes, I'm discussing this in the context of the new API (following a discussion with webmozart). |
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? |
Yes they are, and that is a good point (showing the need for a deprecated flag instead?) |
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. |
Agreed, updated the issue title and text. Thank you for your comments. |
@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:
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! |
@javiereguiluz Unfortunately, ICU data doesn't expose this piece of information. Sometimes, it only mentions years the currency was active, like here: vs: |
@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 |
note that in the JSON file, the |
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 |
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: The |
Thank you for this suggestion. |
Well, yes, Mr. Bot, I would really like to see it. Creating blacklist of outdated currencies is not an easy job :) |
Thank you for this suggestion. |
Bump, thank you and your maker, bot. What's the procedure here? Should I prepare a POC of sorts? |
If you can work on a PR, don't hesitate to do so! |
Thank you for this suggestion. |
Hello? This issue is about to be closed if nobody replies. |
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! |
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.
The text was updated successfully, but these errors were encountered: