Open mengxi-ream opened 1 year ago
I implement the logic in another lib next-intl
https://github.com/amannn/next-intl/issues/88#issuecomment-1791936419
maybe can be a inspiration
Does the fallbackLocale
option in createI18nClient
/ createI18nServer
helps in this situation?
Or do you wish to be able to define the fallback locale per locale, instead of having a single fallback locale for all defined locales?
Does the
fallbackLocale
option increateI18nClient
/createI18nServer
helps in this situation?Or do you wish to be able to define the fallback locale per locale, instead of having a single fallback locale for all defined locales?
https://github.com/amannn/next-intl/issues/88#issuecomment-1791936419
Is using this way now, looks like fine?
It looks fine but should be unnecessary since that's exactly what fallbackLocale
is made for.
Is your feature request related to a problem? Please describe. I have a website which has three languages
en.ts
,zh.ts
andzh-TW.ts
. When translation is not available in zh-TW, actually the best way for users is to show them translation in zh. but now when I setWhen translation is not available in
zh-TW.ts
, it always give me the word fromen.ts
Describe the solution you'd like When translation is not available in zh-TW, show user translation in zh
For example:
When I have this component
in url
http://localhost:3000/zh-TW
it should return me你好
, notHello
. (Now it returns me Hello)Describe alternatives you've considered No
Additional context No