I was reminded of something. Namely this, in the pbpBB Ideas board: Custom language strings for style creation
Any chance of this being implemented in 4.0? Open source code for this sort of thing already exists. I've used it before. It can be really handy.
ETA: Damn. I just thought of how this could be done in 3.3, in an accessible manner, and without relying on extensions.
All you need is to do is make a simple style_strings.html template, with content like this:Then you call that in overall_header.html:Your custom language strings are now template variables, which you can call anywhere:You can now use custom language strings in styles, while not breaking Styles DB rules. If anyone wants to use a different language they just do their own translations. The Twig logic can, I'm sure, be fairly easily adjusted to check for the root tag's lang attribute. Something like:...with the style_strings.html templates being stashed in folders for en/ and whatever other languages you want to support. I'm going to mess with this and get it running. ![Very Happy :D]()
Any chance of this being implemented in 4.0? Open source code for this sort of thing already exists. I've used it before. It can be really handy.
ETA: Damn. I just thought of how this could be done in 3.3, in an accessible manner, and without relying on extensions.
All you need is to do is make a simple style_strings.html template, with content like this:
Code:
{% set string1 = 'English string 1' %}{% set string2 = 'English string 2' %}{% set string3 = 'English string 3' %}{% set string4 = 'English string 4' %}{% set string5 = 'English string 5' %}{% set string6 = 'English string 6' %}{% set string7 = 'English string 7' %}
Code:
{% EVENT overall_header_stylesheets_after %}{% include 'style_strings.html' %}</head>
Code:
<li><a href="{U_SEARCH_SELF}" role="menuitem"><i class="icon fa-file fa-fw" aria-hidden="true"></i><span>{string1}</span></a></li>
Code:
{% include '{S_USER_LANG}/style_strings.html' %}

Statistics: Posted by Gumboots — Wed Apr 09, 2025 8:50 pm