-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add new language dynamically #430
Comments
Hi, @camohub. It does not work, because the library does not access directly to the configurations and works with the helper class config([
'translatable.locales' => $newLocales,
'translatable.locale' => $data['default_language'],
'translatable.fallback_locale' => $data['default_language'],
]);
resolve(Locales::class)->load(); You can check how it's works in test suite: laravel-translatable/tests/LocalesTest.php Lines 21 to 36 in 0d065da
|
Thank you very much. It seems it works. |
@camohub, about |
Thanks again. |
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
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.
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.
The text was updated successfully, but these errors were encountered: