You don't have to use a macro, an
overall_header/head (I've removed thestyle_strings.twig:Any template file:It goes without saying that you can use twig or html for the language keys.
include
will do the job whatever the template using DEFINE
.overall_header/head (I've removed the
is not empty
check which doesn't add anything in the context):Code:
{% set lang_file = 'language/' ~ S_USER_LANG ~ '/style_strings.twig' %}{% if source(lang_file, ignore_missing=true) %}{% include lang_file %}{% else %}{% include 'language/en-gb/style_strings.twig' %}{% endif %}
Code:
{% DEFINE LANG_KEY_1 = "String 1" %}{% DEFINE LANG_KEY_2 = "String 2" %}
Code:
{{ definition.LANG_KEY_1 }}{{ definition.LANG_KEY_2 }}
Statistics: Posted by cabot — Sat Apr 12, 2025 10:37 am