Skip to content
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

local-data folder NOT in i18next-icu 2.0.3 #42

Closed
psxpa3 opened this issue Jun 21, 2021 · 5 comments
Closed

local-data folder NOT in i18next-icu 2.0.3 #42

psxpa3 opened this issue Jun 21, 2021 · 5 comments

Comments

@psxpa3
Copy link

psxpa3 commented Jun 21, 2021

Hello,
I am working on upgrading i18next-icu from 1.4.2 -> 2.0.3, however, seems locale-data folder does not seem exist anymore.
If that is the case, may I know how to access locale files?. Like in this documentation - https://www.npmjs.com/package/i18next-icu/v/1.4.2, can see import fr from 'i18next-icu/locale-data/fr'; exist but this does not apply for v2.0.3. May I know how can we access locale files in this case. I could not find any example or any link that might be helpful for this.
Best,
Priya

@adrai
Copy link
Member

adrai commented Jun 22, 2021

the newest intl-messageformat uses Intl's built-in locales, so no more locale loading. This is the reason it was bumped to 2.0.0

@adrai adrai closed this as completed Jun 22, 2021
@spacejamjim
Copy link

@adrai is there a migration document for this?
For example:
import de from 'i18next-icu/locale-data/de' is still in the documents here: https://react.i18next.com/misc/using-with-icu-format#extend-the-i-18-n-instance-with-icu-module

How would I now do this?

@adrai
Copy link
Member

adrai commented Jun 23, 2021

@cellog can you help?

@psxpa3
Copy link
Author

psxpa3 commented Jun 23, 2021 via email

@adrai
Copy link
Member

adrai commented Jun 23, 2021

I just updated the react-icu example: i18next/react-i18next@c5068a1
=> https://github.com/i18next/react-i18next/tree/master/example/react-icu

Yes, the locale-data folder is expected to not exist anymore, because the newest intl-messageformat uses Intl's built-in locales, so this is not needed anymore.
So if you want to use i18next-icu v2 make sure you update your intl-messageformat dependeny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants