You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setup for this is already done. All we need to do is render a select dropdown somewhere on the page to change language based on the /public/static/locales/languages.json file.
You can use this guide to use the useTranslation hook to change the language when the language is changed in the dropdown.
Render a dropdown on the page which lists all the languages the project supports.
The dropdown should trigger the change language event for the whole application by using the useTranslation hook.
Plus points if you can remember user's previously saved language in localStorage/ Cookies.
Super plus points if you can add the functionality to detect browser language and select language automatically at page load based on device's default language.
The text was updated successfully, but these errors were encountered:
The setup for this is already done. All we need to do is render a select dropdown somewhere on the page to change language based on the
/public/static/locales/languages.json
file.You can use this guide to use the
useTranslation
hook to change the language when the language is changed in the dropdown.For more information and background, check this https://react.i18next.com/latest/using-with-hooks
What is expected?
useTranslation
hook.localStorage
/Cookies
.The text was updated successfully, but these errors were encountered: