Closed Largo closed 7 years ago
Hey fellow nomad :)
Thanks for reporting. Unfortunately, I'm too far away from bolt's codebase currently, I'm only just maintaining a few 2.x installations and haven't been keeping track of the changes for 3.x lately.
I'll keep this ticket open in case I find some spare time to look into this on a fresh bolt installation soon, I reckon it's a pretty small bugfix. Sorry for the troubles in the meantime...
@Largo Did some checks on both 3.2.2 and 3.2.5. and figured out some things.
When translation files only use a language code (like de
) all variants of the code (de_DE
, de_CH
in config.yml) will work. This actually works like a kind of fallback.
If there is also a country code in the file name (like 'de_CH'), it will only match the full code and will ignore de
or de_DE
. The same issue you have with the german language, I have with the dutch one.
I personally think the way it is used in the plugin is the correct one and works in (almost) all cases. If someone likes to add a seperate Swiss translation, it can easily be added with the de_CH
code. This will override the de
translation.
Within Bolt itself some of the language files are using the de_DE
style. That's the reason de_CH
will not work and will fallback to english. It would be recommend to report this one to Bolt and let Bolt handle at least a default for all languages they support.
I hope this answers your question.
This should be handled automatically just like in bolt. de_CH
and de_DE
should both fallback to de
if they don't exist.
@navelpluisje Want to open that issue in bolt/bolt?
@SahAssar Within this extension they both fallback to de
. Just tested it in 2 versions mentioned above. Also tried it with other languages line nl_NL
en nl_FRY
. They both fallback to nl
. Within Bolt it doesn't 'cause there isn't a de
or nl
(fallback)translation, just like for some more translations like the dutch one. Should the issue be the addition of fallback languages?
@navelpluisje Ah, then I sorta misunderstood the issue... This has been a loooooong running discussion within bolt, see for example bolt/bolt/issues/5038, bolt/bolt/issues/5042 and bolt/bolt/issues/5056...
This is probably going to get resolved one way or another, but with so many wills pulling in different directions it might take a while.
@Largo Looks like this is the same issue as: https://github.com/bacbos/bolt-menu-editor/issues/48. Probably caused by cache which is a Bolt issue which they are looking for the best way to handle the cache. You can try to remove the trans
-folder from /app/cache/
. Should do the trick.
Closing/merging into #48, since it's the same bug. Manually deleting the trans
folder should fix it, and will need to be done each time the locale is changed or the extension is installed. For more info see bolt/bolt/issues/5727
Just a heads up: Seems like that translations aren't loaded. my locale in config.yml: de_DE de_CH also doesn't work
German translation actually shows up when I use just "locale: de", but then the rest is english and it's not good. Thanks for the good work :)
My workaround is to copy the content of the de.yml file of the extension into /vendor/bolt/bolt/app/resources/translations/de_DE/messages.de_DE.yml
Bolt: 3.2.4