QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.26k stars 59 forks source link

fallback and fallbackLocale #209

Closed temtechie closed 11 months ago

temtechie commented 11 months ago

Is your feature request related to a problem? Please describe. No clear documentation guide to include fallback on the package doc site

Describe the solution you'd like to provide a concrete documentation on the usage of fallback and fallback locale

Additional context You can also provide a fallback component prop to show while waiting for the locale to load, and a fallbackLocale prop to specify a locale to fallback on if a key has not been translated. copied from doc site

QuiiBz commented 11 months ago

This will be solved by https://github.com/QuiiBz/next-international/pull/205, which removes the need for fallbackLocale inside I18nProviderClient.

The new documentation about fallback is simply:

You can also provide a fallback component prop to show while waiting for the locale to load.

Is that clear enough or do we still need to improve it?

temtechie commented 11 months ago

helpful