Comments (3)
There are two things wrong here:
numberingSystem
should be an option of the constructor, not an option offormat
.- The only way to test whether
Intl
supports an option is to queryresolvedOptions
. Otherwise, the output may simply be due to lack of data.
Here's the output:
![image](https://private-user-images.githubusercontent.com/55398995/337875227-50cbe8c2-57dc-4ba9-add5-ae51ef6bda8e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5MDA1MTAsIm5iZiI6MTcxODkwMDIxMCwicGF0aCI6Ii81NTM5ODk5NS8zMzc4NzUyMjctNTBjYmU4YzItNTdkYy00YmE5LWFkZDUtYWU1MWVmNmJkYThlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDE2MTY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5NTA5MDNjY2YyOTNlNmM5M2Q0MTY1MDY0ODFmN2ZhOTJhM2FjNzNhNDBjODIzMmYxOTNiNzcwMmRkYzRjYmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Rkh16yUtrO_zkzfxWgpn8M2k4Cy1aWNMBZQIHYMwtQQ)
Therefore Firefox 75 does support numberingSystem
. It's just that ar-EG
data did not have the nu-latn
combination.
from browser-compat-data.
- My apologies, I've corrected the screenshot in testing steps to match the actual steps used.
- I see, that makes sense. Is there any way to detect which numberingSystems are supported beyond checking the resolved options after trying to apply them?
Locale accessornumberingSystems
returns["arab"]
on browsers that resolve thenumberingSystem: "latn"
option which seems to me like it contradicts the notes here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#numberingsystem
Win/Chrome 125:
from browser-compat-data.
Locale#numberingSystems
returns the list of numbering systems that are commonly used in the locale. It doesn't necessarily mean the formatter only supports using those particular combinations (I could be wrong but that's my interpretation). When the doc says "For a list of supported numbering system types" it means to refer to the complete table for all values that are considered valid.
Is there any way to detect which numberingSystems are supported beyond checking the resolved options after trying to apply them?
I'm not sure either, as I'm not an expert on the CLDR data format. In fact, I believe it may be a non-issue in the latest browser version, because the data uses templates that gets filled in with any numbering system you want. For example, ar-EG
with the hanidec
(Positional decimal system using Chinese number ideographs as digits) numbering system is an obviously nonsensical combination, but Chrome formats it anyway:
new Intl.NumberFormat("ar-EG", { numberingSystem: "hanidec" }).format(1234)
// 一,二三四
resolvedOptions
also doesn't indicate whether data is available. You may specify a non-sensical combination that doesn't have data, which will cause fallback when calling format
, but this fallback won't be reflected by any other means.
from browser-compat-data.
Related Issues (20)
- Autofocus is not supported on iOS Safari HOT 1
- api.Window.visualViewport - <SUMMARIZE THE PROBLEM> HOT 1
- html.global_attributes.autofocus - value differs from caniuse
- api.Document.parseHTMLUnsafe_static - <SUMMARIZE THE PROBLEM> HOT 1
- api.Document.parseHTMLUnsafe_static - Incorrect Firefox support version HOT 3
- api.SpeechRecognition - <SUMMARIZE THE PROBLEM> HOT 1
- api.SpeechRecognition - Mobile Chrome browser does not support HOT 1
- Speech Recognition not working In Edge browser,Speech is not recognizing (only using intranet office network) HOT 1
- css.properties.image-rendering - Chrome does not support `crisp-edges`
- WebGPU is in Safari TP
- CSSStyleDeclaration's `@@iterator` link goes to a "Page not found" HOT 1
- api.Element.paste_event - <SUMMARIZE THE PROBLEM> HOT 1
- api.console.assert_static - <SUMMARIZE THE PROBLEM> HOT 1
- html.elements.embed - Embed on Edge triggers download
- javascript.operators.logical_not - <SUMMARIZE THE PROBLEM> HOT 1
- api.Clipboard - The presentationStyle getter steps are to return this's clipboard item's presentation style.
- KeyboardEvent API: repeat - Not working in chrome
- api.Window.launchQueue - not supported on Chrome Android
- webextensions.manifest.web_accessible_resources - use_dynamic_url can be set but has no effect as it is not implemented in Chromium until now
- api.FileSystemSyncAccessHandle.write - Write success but data is empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-compat-data.