Closed gustaveWPM closed 11 months ago
Probs related: https://github.com/QuiiBz/next-international/issues/190
Thanks for the reproduction. I've just tried and the issue appears to be because of the spread of fallbackLocale
. Inlining fallbackLocale={fallbackLocale}
works as expected, and shows this locale immediately:
Feel free to re-open if needed!
Haha, that's funny! I'll try it rn. Thank you a lot.
Sorry to have misused the I18nProviderClient
.
It has fixed my problem, thank you.
I was misusing the spread operator.
<I18nProviderClient {...{ fallbackLocale }}> // * ... Oops! Initially wrote: <I18nProviderClient {...fallbackLocale}>
This works exactly as:
<I18nProviderClient fallbackLocale={fallbackLocale}>
It was totally my fault.
(I hate repeating the field name with the x={x}
syntax, but this time, I have epic failed, HAHA).
Hello. I was expecting the
I18nProviderClient
to "Fallback" on thefallbackLocale
values during the loading phase, instead of showing raw locales keys. (In practical terms, it doesn't really matter since I've set up a Splash Screen during this loading phase.)I just find this behavior rather curious. Maybe I've misunderstood something and it's coming from my code?
https://github.com/Tirraa/dashboard_rtm/tree/6e8d75e0ad79d6dc9b8d1bd6bed4671193d9ada0
EDIT: I was misusing the spread operator.
It was totally my fault.