Comments (7)
yeah you'd need to import en
locale data as well. polyfill-force
overrides the native implementation so for whichever locale you want you'd have to import those data separately
from ember-intl.
Ok then looks like u do need them all then but you should look into why. It's a bit odd that an app need to render multiple locales at the same time
from ember-intl.
You have to import polyfill-force
from ember-intl.
You have to import polyfill-force
Hello, thank you for reply.
With
import '@formatjs/intl-numberformat/polyfill-force';
import '@formatjs/intl-numberformat/locale-data/so';
I have a problem with:
Uncaught Error: [@formatjs/intl Error MISSING_DATA] Missing locale data for locale: "en-us" in Intl.NumberFormat. Using default locale: "en-us" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details
(I don't use "en-us" language, in my folder I have en
, es
, ko
, vi
, zh
, ar
)
not sure why without polyfill-force
it allows me to use en-us
and with it not
from ember-intl.
@longlho thank you for help
with
import '@formatjs/intl-numberformat/polyfill-force';
import '@formatjs/intl-numberformat/locale-data/en';
import '@formatjs/intl-numberformat/locale-data/es';
import '@formatjs/intl-numberformat/locale-data/ar';
import '@formatjs/intl-numberformat/locale-data/ko';
import '@formatjs/intl-numberformat/locale-data/so';
import '@formatjs/intl-numberformat/locale-data/vi';
import '@formatjs/intl-numberformat/locale-data/zh';
import '@formatjs/intl-datetimeformat/polyfill-force'
import '@formatjs/intl-datetimeformat/locale-data/so';
import '@formatjs/intl-datetimeformat/locale-data/en';
import '@formatjs/intl-datetimeformat/locale-data/ar';
import '@formatjs/intl-datetimeformat/locale-data/es';
import '@formatjs/intl-datetimeformat/locale-data/ko';
import '@formatjs/intl-datetimeformat/locale-data/vi';
import '@formatjs/intl-datetimeformat/locale-data/zh';
this works to me :) (I forgot to write that also I had zh
)
from ember-intl.
It's a lot of data so I'd recommend you load each locale conditionally
from ember-intl.
It's a lot of data, so I'd recommend you load each locale conditionally
Do you have an example of how to do it conditionally? In my app, when I remove any of these imports then I got an error at the beginning of the app (not sure why, because it looks like I need all of them at the beginning)
from ember-intl.
Related Issues (20)
- Better story for testing with lazy-loaded translations config HOT 5
- set locale normalizes localeName while getOrCreateIntl does not
- Ember-intl 6.x crashes on empty translation keys HOT 4
- Trying to add custom locales crashes the application HOT 3
- Add support for RON currency symbol: lei HOT 1
- [BUG] DateTimeFormat type errors - Might need to bump intl-messageformat to get it fixed HOT 4
- Consider more forgiving DX HOT 2
- What changed in v6? HOT 1
- Error: Could not find module `@formatjs/intl` imported from `ember-intl/services/intl` HOT 1
- Embroider support? HOT 1
- Rendering tests fail with get before set during rendering inside ember-intl HOT 1
- Missing fast-memoize module when updating ember-auto-import HOT 1
- When will there be another release? HOT 1
- Type issues from Registry HOT 6
- Type issues from -format-base.d.ts HOT 1
- bump typescript peer dependency to 5 HOT 3
- trailingZeroDisplay not working HOT 4
- FORMAT_ERROR when using the `Intl.RelativeTimeFormat` polyfill with `v6.0.0` of ember-intl HOT 4
- Double `intl.d.ts` cause type errors HOT 8
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 ember-intl.