diff options
-rw-r--r-- | modern/src/common/components/LocalizationProvider.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modern/src/common/components/LocalizationProvider.js b/modern/src/common/components/LocalizationProvider.js index 6bc64831..9c51841c 100644 --- a/modern/src/common/components/LocalizationProvider.js +++ b/modern/src/common/components/LocalizationProvider.js @@ -178,7 +178,7 @@ export const useLocalization = () => useContext(LocalizationContext); export const useTranslation = () => { const context = useContext(LocalizationContext); const { data } = context.languages[context.language]; - return useMemo(() => (key) => data[key], [data]); + return useMemo(() => (key) => (data[key] ? data[key] : context.languages.en.data[key]), [data]); }; export const useTranslationKeys = (predicate) => { |