Hi,
Trying to extend a plugin languages. Wouldn’t want to edit languages.yaml in a plugin folder directly. Any instrunctions how do I do that?
Thanks
Hi,
Trying to extend a plugin languages. Wouldn’t want to edit languages.yaml in a plugin folder directly. Any instrunctions how do I do that?
Thanks
@Karmalakas, To add an extra translation for a plugin, you can do the following. Also see the docs about Translation Overrides.
Let’s add 'Italian to the plugin:
user/plugins/test/languages.yaml
:en:
PLUGIN_TEST:
TEXT_VARIABLE: Text Variable
TEXT_VARIABLE_HELP: Text to add to the top of a page
user/languages/it.yaml
PLUGIN_TEST:
TEXT_VARIABLE: <Translation in Italian>
TEXT_VARIABLE_HELP: <Translation in Italian>
it
to user/config/system.yaml
:languages:
supported: [en, it]
{{ 'PLUGIN_TEST.TEXT_VARIABLE' | t }}
in a template , it will be translated into Italian when you browse to the Italian version of the page.OK, so this works for front-end, but not Admin. I translated Login plugin to LT. Everything is in user/languages/lt.yaml
PLUGIN_LOGIN:
USERNAME: "Vartotojo vardas"
EMAIL: "El. paštas"
USERNAME_EMAIL: "Vartotojo vardas/El. paštas"
<...>
I also went to my profile (top left of Admin) and changed the language, but still can’t see any changes. And actually none of Admin strings are translated - whole Admin is still in English. What am I missing?
It seems I just had to re-login to Admin