Code: Select all
{% include ['language/' ~ S_USER_LANG ~ '/posting_editor_incl.twig', 'language/en-gb/posting_editor_incl.twig'] %}
It works. Same tests as before: English, Estonian and Romanian, with no files for Estonian.<!-- IF S_LINKS_ALLOWED and S_MAGIC_URL_CHECKED -->
<div>
{# @Gumbootz: custom language string. #}
{{ definition.GB_URLPAR_DISABLED }}
</div>
<!-- ENDIF -->
<!-- IF S_BBCODE_ALLOWED and S_BBCODE_CHECKED -->
<div>
{# @Gumbootz: custom language string. #}
{{ definition.GB_BBCODE_DISABLED }}
</div>
<!-- ENDIF -->
<!-- IF S_SMILIES_ALLOWED and S_SMILIES_CHECKED -->
<div>
{# @Gumbootz: custom language string. #}
{{ definition.GB_SMILEY_DISABLED }}
</div>
<!-- ENDIF -->
The Twig docs say the function is cooler and groovier, so I suppose I might as well use it. A couple of extra brackets aren't going to kill me. I'll edit the code now...cabot wrote: Sat Apr 12, 2025 11:33 amAnd perhaps also because I prefer the flexibility of the function (which does nothing here).
ignore_missing
thrown into the mix, just in case some muppet loses their en-gb file.Code: Select all
{{ include('sidebar.html.twig', ignore_missing: true) }}
Code: Select all
{{ include(['language/' ~ S_USER_LANG ~ '/styleStrings.twig', 'language/en-gb/styleStrings.twig'], ignore_missing = true) }}
Code: Select all
{% DEFINE GB_URLPAR_DISABLED = '<strong>You have disabled automatic parsing of URL\'s.</strong>' %}
Code: Select all
{% DEFINE GB_URLPAR_DISABLED = '<strong>You have disabled automatic parsing of URL's.</strong>' %}