Nested translations do not work?


I have been using kirby for a couple of years now, but never nested translation keys. For a new project, i thought about decluttering translation keys and startet nesting them. I’m using a yaml file for each language which looks like this:

# Buttons
    send: Absenden
    next: Weiter

For the most part I started using the translations via kql api inside svelte components (using svelte-i18n), which works like a charm. But yesterday, stumbled upon the problem, that those nested translations are not working using the t() helper method.

t('') # results in nothing
t('buttons') # is an array
t('button')['next'] # does funtionally work, but .. 

Am I missing anything or is it just possible to use simple structured translations in php?

Thanks in advance! :slight_smile:

I think that’s not supported. While you can use dots to group/structure your keys like Kirby does kirby/bg.json at master · getkirby/kirby · GitHub, nesting them is not possible.

Ahh very clever to look in the main repo. Haven’t thought about that :sweat_smile:
Too bad, but seems your’re right.