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: