Function useChangeLanguage

  • Detect when the locale returned by the root route loader changes and call i18n.changeLanguage with the new locale. This will ensure translations are loaded automatically.

    Parameters

    • locale: string

    Returns void