Node only supports English by default
See original GitHub issueTest code:
let formatMessage = require("format-message")
formatMessage("{d, date, long}", {d: new Date()}, "ru-RU")
Expected Result: 25 июня 2017 г.
Actual Result (Node v8.0): 2017 M06 25
On Node v7.9.0 it gives wrong result too (but at least month is printed (in other language ofc)): June 25, 2017
Moment works fine meanwhile
> moment().locale('ru-RU').format('LL')
< '25 июня 2017 г.'
Seems it’s nodejs problem, so may be use external library for a time?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Internationalization support | Node.js v19.3.0 Documentation
The full ICU data set is provided by Node.js by default. ... includes a subset of ICU data (typically only the English locale)...
Read more >How can I get the browser language in node.js (express.js)?
You can use req.headers["accept-language"] to get the language/locale the user has set in his browser. For easier support, you may want to ...
Read more >Node.js Tutorial on Creating a Multilingual Web App | Phrase
So far, our server only supports two languages. If you use languages that are not supported, it will default to English.
Read more >fallback to default language when node not translated ... - Drupal
However the prefaces are currently in German and English, but are not translated to French yet. So if I set the node languages...
Read more >Available node language only English - Drupal Answers
That is because you have Set custom language as default for new content. (and the current one as the default). If you want...
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 FreeTop 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
Top GitHub Comments
The message is a bug on full-icu’s side: autodetection has not been implemented in Node.js. See https://github.com/unicode-org/full-icu-npm/issues/6 and my PR to help clarify that: https://github.com/unicode-org/full-icu-npm/pull/15.
Sorry about the confusion! I was fairly confused as well when I first used the full-icu package 😄
It sounds like all that needs to be done here is to document that node internationalization support requires special steps depending on the locales you want to use.
Would a note and a link to https://nodejs.org/api/intl.html be sufficient for this?