Replies: 1 comment
-
I understand what is the problem, all my language files have keys in dot notated way and of course they are not replaced.. correct way I see now is to store them as array. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I was struggling with custom translations of user input, sometimes it worked, sometimes not.
Today I found the reason.
In database is stored next entry:
In file "sl/dashboard.php" is this:
But output I get always from file and not from database, below I modified "spatie/laravel-translation-loader/src/TranslationLoaderManager.php", if I add "$loaderTranslations = \Illuminate\Support\Arr::dot($loaderTranslations);" I receive correct translation from database.
This is output when is not dot notation added.
Hope I'm not doing something wrong on storing information in database?
Versions:
Laravel: 8.83.27
Spatie/laravel-translation-loader: 2.7.5
Thank you!
Best regards,
Klemen
Beta Was this translation helpful? Give feedback.
All reactions