Kirby variables field and some languages not working

Iā€™m using great https://github.com/OblikStudio/kirby-variables-field plugin. But realise, that some languages not working and I donā€™t know why. For example, language with es code not working (Iā€™m getting variables from default language) but when I rewrite it to sk everything working as expected. Any suggestion where is the problem or how to debug it?

Thanks

Did you manage to fix this?

I also create a issue on github, but I donā€™t have an answer. I needed to solve it quickly, so for now I switched to classic translations array in language definition :frowning:

Interesting. Iā€™m currently experiencing exactly the same in one of my installations: es isnā€™t displayed properly; it defaults to en which is also the default for this site. Luckily ā€œESā€ doesnā€™t need to go live yet, so I have time to figure this out.

I donā€™t use the kirby-variables-field plugin in the site where I experience this. So I doubt itā€™s related to this plugin, but I assume itā€™s something in core instead?

Iā€™ll try to figure out a bit more, and maybe try it in a fresh starterkit as well.

1 Like

FYI I have same problem with cz code.

I canā€™t replicate this in a starterkit.

I use a yaml file for each languageā€™s variables that I pull into translations. I deleted that file for es and recreated that file from scratch. At first sight, it seems to work nowā€¦ That makes me wonder if itā€™s a core issue tbh. I think my issue was more of a filesystem quirk or some weird thing with that imported fileā€¦

Yes, yaml files are generated from translations array but itā€™s not editable from admin. Translations array rewrite itā€¦ What about you?

I donā€™t let the editors edit them from panelā€¦

OK, so same solution as me?

Iā€™m sorry, I think I misunderstood.

At my end; the translations happen directly in yaml files. Then I add them to my codebase & deploy them to the website. So they cannot translate the info in the language variables without passing through me.

But yml files generate plugin, no?
You donā€™t have translations array in language definition?

I cast yaml to array like this: 'translations' => Yaml::decode(F::read(kirby()->root('languages').'/vars/en.yml'))

Ah, OK. You are master, Iā€™m noobie :slight_smile: