Closed psxpa3 closed 3 years ago
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 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?
@cellog can you help?
Thank you for raising this concern. I spent one entire day in figuring out this. The documentation is very confusing.
My question again:- I am upgrading from 1.4.2 to the latest version of
i18next-icu package. On the 1.4.2 version documentation can see the
import de from 'i18next-icu/locale-data/de' to fetch the local files. However, on upgrade to 2+ versions, the
locale-data` folder
does not exist anymore, and hence my existing test-cases are failing.
Could you point us out the documentation/sample example as to how accommodate this change in the code for this update?
On Wed, Jun 23, 2021 at 12:17 PM Adriano Raiano @.***> wrote:
@cellog https://github.com/cellog can you help?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i18next/i18next-icu/issues/42#issuecomment-867094672, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY5CU5DLKBNP6GJGC3EG3TUIXNFANCNFSM47CK5W4A .
I just updated the react-icu example: https://github.com/i18next/react-i18next/commit/c5068a14dbbf62476688ba807700024e36e1b970 => 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
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