Locale Resolution
This library handles the detection of what locale to use for you, but it can be done in a multiple of ways.
Here is the list of detection methods, sorted in priorities:
- A locale prefix is present in the URL pathname when using
I18nRoute
(e.g./en/about
) - A cookie is present that contains a previously detected locale
- A locale can be matched based on the
Accept-Language
header in SSR - A locale can be matched base on the
navigator.languages
API in CSR - As a last resort, the default locale is used.
In SSR it is always the server that resolves what locale to use, the client do not tries to compute a locale when loading, the only locale changes that can happen is by explicitly setting it in the context.