React hook that re-renders the calling component whenever the active locale
changes. Subscribe near the app root so a language switch cascades to the
whole tree; bare i18n() calls in descendants then resolve to the new locale.
Returns string
The active locale code.
Example
constlocale=useLocale(); // re-renders on setLocale(...)
React hook that re-renders the calling component whenever the active locale changes. Subscribe near the app root so a language switch cascades to the whole tree; bare
i18n()calls in descendants then resolve to the new locale.