Language variables in YAML files?

Hello!

I know about PHP language files for translating user interface. However, I didn’t know that I could also use YAML files. PHP usage is only documented in Custom language variables, while YAML usage is only documented in Multilanguage secrets. Why is that? Can I use both file types interchangeably? I tested the YAML approach in Kirby 2.5.12 and it works, so it’s not a Kirby 3 feature.

I guess YAML can be used as a simpler approach, while PHP can be used if you want to apply some logic to those translation files. Are there any other differences besides that?

Thanks!

The explanation is quite simple: we just missed to add that to the main documentation although that feature was added in 2.4.0 (so two years ago) :thinking:

You can use them interchangeably.

Edit: I updated the language docs.

3 Likes

Hi @texnixe, could you point us to the updated documentation about YAML? I can’t find it… :see_no_evil:

1 Like

https://getkirby.com/docs/languages/variables

1 Like