Is there a way to check if a locale exists on react app ? Like a boolean true/false
Is there a way to check if a locale exists on react app ? Like a boolean true/false
Yes, you can check if your language variable exists with i18n.exists() method:
You can extract i18n from useTranslation hook.
const { t, i18n } = useTranslation();
Then call i18n.exists('my.key'), for example:
i18n.exists("common.values.active")