Language variables in Kirby 3 not working

Maybe I have bad day,

but I have variable in language definition:

<?php

return [
  'code' => 'en',
  'default' => true,
  'direction' => 'ltr',
  'locale' => 'en_US',
  'name' => 'English',
  'url' => '/',
  'translations' => [
    'video_label' => 'Tralala'
  ]
];

and I’m using this function: <?= t('video_label') ?>
Nothing is returned :frowning:

Just tested and works for me…

Looks like it.

Questions => Please choose questions category and correct Kirby version next time?

I tried to update to 3.0.2, switch to different PHP versions and still not working.
I’m desperate :slight_smile:

Is caching enabled, so changes don’t show up?

When I print $kirby->language() I get only:

Kirby\Cms\Language Object
(
    [code] => en
    [default] => 1
    [direction] => ltr
    [locale] => en_US
    [name] => English
    [url] => //localhost:3000
)

No

That’s normal, the language array doesn’t provide any more information.

What is your Kirby version?

What does

dump(i18n::translation('en'));

give you? Your custom translation should be somewhere at the end.

Kirby 3.0.2

And my custom translation strings are not in array when I dump i18n::translation('en')

Are you useing any plugins?
I had the same problem and the issue was with a plugin wich had this issue: https://github.com/getkirby/kirby/issues/1307

YES!
When I remove my plugin which define custom kirbytag language variables working.

So second question is, where is the problem within plugin:

In index.php I have:

<?php

Kirby::plugin('soma/tags', [
    'tags' => [
        'sometag' => require_once __DIR__ . '/tags/sometag.php'
    ]
]);

And in sometag.php:

<?php

return [
  'html' => function($tag) {
    return '<sometag>' . $tag->value . '</somateg>';
  }
];

Correction: problems is within another plugin which set different blueprints by user roles.