Closed kazak71 closed 2 weeks ago
"...but when I place these files in statamic/cms package (vendor/statamic/cms/resources/lang) everything works fine."
This is the intended location for all Lang files indeed.
ebeauchamps thank you for your reply! But according to laravel documentation If I put files in /lang/vendor/statamic they should work. And they don't work. It is not a good idea to modify the installed package directly (in /vendor/statamic/cms/... folder).
Only php language files can be overridden in the lang/vendor/statamic
directory.
The json files need to just go in lang
.
Ideally you would do like @ebeauchamps has said and contribute the translations into Statamic itself, but I understand maybe you want to do this temporarily.
I put files like this: /lang/vendor/statamic/bg.json /lang/vendor/statamic/bg/messahes.php ... And nothing works. When I put these files (bg.json and bg folder with php files) in /vendor/statamic/cms/resources/lang only json file is translated. Here is screenshot:
It seems to be working fine for me 🤔
Can you share your lang files?
I put files like this: /lang/vendor/statamic/bg.json /lang/vendor/statamic/bg/messahes.php ...
You need to do this:
/lang/bg.json /lang/vendor/statamic/bg/messages.php
Bug description
I made bulgarian translations of lang files (bg folder with message files and bg.json) and place them in lang/vendor/statamic folder. By changing locale to 'bg' nothing happens, but when I place these files in statamic/cms package (vendor/statamic/cms/resources/lang) everithing works fine.
How to reproduce
Publish translations, make a copy of en.json to bg.json, change any strings, change locale in .env to 'bg' and you will not see any changes.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response