From a5db2fb692217b3b1261b02b88c2042028972018 Mon Sep 17 00:00:00 2001 From: Jacob McGowan Date: Sat, 24 Aug 2024 13:29:36 -0400 Subject: [PATCH] Gets system language and sets it as default on first launch. --- src/providers/LanguageProvider/LanguageProvider.reducer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/providers/LanguageProvider/LanguageProvider.reducer.js b/src/providers/LanguageProvider/LanguageProvider.reducer.js index 68a17418d..d39709164 100644 --- a/src/providers/LanguageProvider/LanguageProvider.reducer.js +++ b/src/providers/LanguageProvider/LanguageProvider.reducer.js @@ -4,7 +4,8 @@ import { SET_DOWNLOADING_LANG } from './LanguageProvider.constants'; import { LOGIN_SUCCESS } from '../../components/Account/Login/Login.constants'; -import { DEFAULT_LANG } from '../../components/App/App.constants'; +import { APP_LANGS } from '../../components/App/App.constants'; +import { getDefaultLang } from '../../i18n'; function getDir(lang) { const locale = lang.slice(0, 2); @@ -12,7 +13,7 @@ function getDir(lang) { } const initialState = { - lang: DEFAULT_LANG, + lang: getDefaultLang(APP_LANGS), dir: 'ltr', langs: [], localLangs: [],