You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use next-intl but I run into a bug. My language is set to the "en_US" format. When we use the language in this format and try to do an interpolation, this error occurs: Error: INVALID_MESSAGE: Incorrect locale information provided
It only has 3 commits.
The first is a copy of the example example-app-router-without-i18n-routing (the base example: https://github.com/amannn/next-intl/tree/main/examples/example-app-router-without-i18n-routing).
The second commit is changing the name of the language files (even the second commit is working normally)
In the third commit I just add the variable for interpolation, then I start getting the error
Verifications
I've verified that the problem I'm experiencing isn't covered in the docs.
Change the language files from "en" to "en_US" and "de" to "de_DE".
And make the necessary adjustments (this commit: yardz/example-app-router-without-i18n-routing--error@7d7c70a) ---- At this stage the example you provide is working normally ----
@amannn I believe that's not why. All translations work with "_" (underscore) only interpolations do not work. If that were the case, all translations should stop working, right?
I put a print. You can see that "Login" is working but the interpolation is not.
Description
I'm trying to use next-intl but I run into a bug. My language is set to the "en_US" format. When we use the language in this format and try to do an interpolation, this error occurs:
Error: INVALID_MESSAGE: Incorrect locale information provided
I reproduced the error in this repository:
https://github.com/yardz/example-app-router-without-i18n-routing--error
It only has 3 commits.
The first is a copy of the example
example-app-router-without-i18n-routing
(the base example: https://github.com/amannn/next-intl/tree/main/examples/example-app-router-without-i18n-routing).The second commit is changing the name of the language files (even the second commit is working normally)
In the third commit I just add the variable for interpolation, then I start getting the error
Verifications
Mandatory reproduction URL
https://github.com/yardz/example-app-router-without-i18n-routing--error
Reproduction description
The quickest way to reproduce is:
Change the language files from "en" to "en_US" and "de" to "de_DE".
And make the necessary adjustments (this commit: yardz/example-app-router-without-i18n-routing--error@7d7c70a) ---- At this stage the example you provide is working normally ----
Then add a variable for interpolation (This commit: yardz/example-app-router-without-i18n-routing--error@b700d49)
Use this example as starting point: https://github.com/amannn/next-intl/tree/main/examples/example-app-router-without-i18n-routing
Expected behaviour
the interpolation works with file "en" but does not work with the pattern "en_US". I believe it should also work with the "en_US" pattern
The text was updated successfully, but these errors were encountered: