Skip to content

Commit

Permalink
Fix langs (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkudasov committed Sep 17, 2024
1 parent dba72f7 commit 06d3cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import LocalizedStrings from 'react-native-localization';
import {Events} from '@app/events';
import {Language} from '@app/models/language';
import {AppLanguage} from '@app/types';
import {setRTL} from '@app/utils';

import {app} from './contexts';

Expand Down Expand Up @@ -1077,5 +1076,5 @@ export function setLanguage(lang: AppLanguage, keys?: Object) {
translations.setContent({[lang]: keys ?? supportedTranslationsMap[lang]});
translations.setLanguage(lang);
app.emit(Events.onLocaleChanged, lang);
setRTL(lang);
// setRTL(lang);
}
7 changes: 4 additions & 3 deletions src/models/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class LanguageStore {
this.current = current;
}

this.keys =
supportedTranslationsMap[this.current] ??
supportedTranslationsMap[AppLanguage.en];
if (!supportedTranslationsMap[this.current]) {
this.current = AppLanguage.en;
}
this.keys = supportedTranslationsMap[this.current];
// @ts-ignore
this.hash = this.keys._hash;

Expand Down

0 comments on commit 06d3cb9

Please sign in to comment.