Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2802

[3.3.x] Styles Support & Discussion • Re: Proposal for custom language strings in styles

$
0
0
Have the Powers That Be had any thoughts about this? If you want a working example I can give you one easily enough.

Cabot also pointed out that it can be done with a combination of includes and DEFINE, which is in some ways even better. Then the code in overall_header.html just comes down to this (which will fail safe even if all files get lost):

Code:

{{ include(['language/' ~ S_USER_LANG ~ '/styleStrings.twig', 'language/en-gb/styleStrings.twig'], ignore_missing = true) }}
And string definitions become...
English:

Code:

{% DEFINE DUSTMAN= 'My old man\'s a dustman' %}
Romana:

Code:

{% DEFINE DUSTMAN= 'Bătrânul meu e un gunoier' %}

Statistics: Posted by Gumboots — Tue Apr 15, 2025 12:19 am



Viewing all articles
Browse latest Browse all 2802

Trending Articles