Cannot use locales
See original GitHub issueInside my WebPack project, I am trying to use numeral.js like so:
import numeral from 'numeral'; export default function() { numeral.locale('de'); numeral(1234).format('0,0.000'); }
If I don’t register the locale, I get an error stating that the locale is undefined:
numeral.js:198 Uncaught TypeError: Cannot read property 'delimiters' of undefined at numberToFormat (numeral.js:198) at Numeral.format (numeral.js:602)
Otherwise if I register the locale, I get:
Uncaught TypeError: de locale already registered. at Function.numeral.register (numeral.js:468)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Can't use specific Locales in Numberformat - Stack Overflow
I just want to use danish as the locale when getting a currency numberformat (where it says French now) but no locale "code"...
Read more >2625983 - Locale ID cannot be used - SAP Support Portal
2625983 - Locale ID cannot be used · 1. Login in as system Admin > Go to References > Geography > Locales >...
Read more >Fix Error - Locale: Cannot Set LC_ALL to default locale
In this guide let's discuss how to fix the error “locale: Cannot Set LC_ALL to default locale: No such file or directory” in...
Read more >How do I fix my locale issue? - Ask Ubuntu
First run locale to list what locales currently defined for the current user account: $ locale LANG=C LANGUAGE= LC_CTYPE=fi_FI.
Read more >cannot use LOCALE flag with a str pattern" in Python 3.6.0
Running behave features fails with "ValueError: cannot use LOCALE flag with a str pattern" in Python 3.6.0 · "/Applications/PyCharm 2016.3.app/Contents/helpers/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just ran into this issue two years later and it looks like the documentation is still not up to date to reflect the need to manually require or import the language file.
@tiesont Thank you very much for that. I still feel that the documentation needs an update, but this works much nicer. Is there a repo for the documentation?