fix: Frontend translation library expects dash separated, not underscore separated languages – this fix is required to enable working pluralization
This commit is contained in:
@@ -21,7 +21,9 @@ const Authenticated = ({ children }: Props) => {
|
||||
// the user available and means we can start loading translations faster
|
||||
React.useEffect(() => {
|
||||
if (i18n.language !== language) {
|
||||
i18n.changeLanguage(language);
|
||||
// Languages are stored in en_US format in the database, however the
|
||||
// frontend translation framework (i18next) expects en-US
|
||||
i18n.changeLanguage(language.replace("_", "-"));
|
||||
}
|
||||
}, [i18n, language]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user