-
-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
Description
Hi there,
can somebody tell me please how to achieve this.
I need to add new language to the app dynamically.
There is config/translatable.php which contains
'locales' => ['en', 'cs', 'cz', 'sk', 'pl', 'de', 'hu', 'uk', 'us', 'gb', ],
This does not allow to add new language which is not defined in this array. I have a controller which want to add new languages and tries to do it this way.
config([
'translatable.locales' => $newLocales,
'translatable.locale' => $data['default_language'],
'translatable.fallback_locale' => $data['default_language'],
]);
I thought this will cange the config and library will add new language. But the library allow only the languages which are in config file array.
How can I dynamically add new languages to the application?
Thanks.