-
-
Notifications
You must be signed in to change notification settings - Fork 512
Open
Labels
Description
I have install stancl/tenancy to create multi store tenant .
and i have mcamara to setup store default language from settings database table .
`if (Schema::hasTable('languages') && Schema::hasTable('settings')):
$default_language = settingHelper('default_language');
if (!empty($default_language)) :
Config::set('app.locale', $default_language);
endif;
//supported language setting to laravellocalization
$languageList = Language::where('status',1)->get();
$supportedLocales = array();
if ($languageList->count() > 0) :
foreach ($languageList as $lang) :
$langConfigs = $lang->languageConfig->select('name', 'script', 'native', 'regional')->get();
foreach ($langConfigs as $langConfig) :
$langConfig->flag_icon = $lang->flag;
$supportedLocales[$lang->locale] = $langConfig;
endforeach;
endforeach;
// LaravelLocalization::setSupportedLocales($supportedLocales);
Config::set('laravellocalization.supportedLocales', $supportedLocales);
endif;
endif;`
but my problem is :
The default language does not change, it always remains English because the language settings are configured before tenant