Language For Styles / CSS Loading

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
User avatar
Dan Stylez
Registered User
Posts: 278
Joined: Tue Jan 16, 2018 6:17 am

Language For Styles / CSS Loading

Post by Dan Stylez » Wed Oct 16, 2019 4:39 am

I have 3 questions for anyone who may have the answers :D

First question... When creating an extension, you can add whatever language you want via the language folder... is there a similar way to add language to a style?

Example: If I wanted to add a Time & Date sidebar, I can use {L_TIME} but 'Date' is not in the phpBB language.

Second question... It's recommended that all of a custom styles CSS edits should be in 1 CSS file... does that mean if for example you wanted to change h3 from text-transform: uppercase; - rather than changing it to capitalize in the common.CSS you would have to add a new rule in your custom style sheet just to override it?

If you look at the browsers inspector the overrides look a bit messy...
Image
Basically I would like my styles to only have overrides for the base.CSS and normalize.CSS files, but putting all my edits on one CSS sheet would mean I have lots of overrides that could have just been deleted from the original CSS sheet.

Third question... in the Inheritance Guide method 4 suggests putting the style sheets in the Overall Header file, there are 16 CSS sheets in the Prosilver theme folder, would I have to list them all there? or just the 12 @import sheets listed in stylesheet.CSS?
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

User avatar
3Di
Former Team Member
Posts: 14487
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Language For Styles / CSS Loading

Post by 3Di » Wed Oct 16, 2019 5:00 am

Dan Stylez wrote:
Wed Oct 16, 2019 4:39 am
Example: If I wanted to add a Time & Date sidebar, I can use {L_TIME} but 'Date' is not in the phpBB language.
https://twig.symfony.com/doc/2.x/filters/date.html

example (see https://www.php.net/manual/en/function.date.php)
HTML
<span>{{ lang('TIME_NOW') ~ lang('COLON') }} {{ "now"|date("d m Y - H:i", "Europe/Paris") }}</span>

PHP Language file
'TIME_NOW' => 'Current time is',
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
✒️ Black Friday 2019 @ The Studio ▪️◾️

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1213
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Language For Styles / CSS Loading

Post by mrgoldy » Wed Oct 16, 2019 11:58 am

1. Styles developed for phpBB can not include any language strings, they have to do with what is available.

2. If you create a custom style for phpBB, you do not have to put everything into one CSS file. You can create as many as CSS files as you want.

3. Just the ones in prosilver's stylesheet.css, the other ones are included dynamically I believe. So only when required on specific pages or settings. Such as plupload and right-to-left.

User avatar
EA117
Registered User
Posts: 1181
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Language For Styles / CSS Loading

Post by EA117 » Wed Oct 16, 2019 2:03 pm

Maybe it's "cheating" a bit, but even prosilver has language-specific resources... in the form of images that happen to contain words. Such as the "online" overlay image for the profile, which needs to be able to match the style in how it indicates which users are currently logged on. phpBB provides T_STYLESHEET_LANG_LINK for loading the style's /theme/<lang>/stylesheet.css file, and this is already included in overall_header.html; at least for prosilver.

Of course I don't disagree with MrGoldy's actual point, which was that there aren't any text-based language resources inherent to style development, except what the underlying phpBB translation already provides.

Without diverging from that existing approach at all, one option would be to provide an image which contains the "Date & Time" label you want to display. And size it to exactly 1em so that it remains relative to the current text size, etc., to behave "as much like text as possible." You of course have to provide all of those images, for whichever languages you intend for the style to support.

If you did want to pursue text-based, it does make me wonder whether some CSS using the content: property couldn't be leveraged to provide a small amount of "text-based language support" as part of a style. e.g. Class the element that will display your sidebar's label such that you can use ::before or ::after to insert your own "Date & Time" text into that label from the style's /theme/<lang>/stylesheet.css file.

Definitely nothing I've done before, and maybe there is some technical pitfall I'm not recognizing there. But seemed like it should be "an option", for what it's worth.


Edit: Well of course I've overlooked the obvious. In absence of having any formal language support expected as part of the style (e.g. a style-defined L_MY_CUSTOM_STRING or similar), you can simply make that decision right in the HTML template itself. Without relying on CSS anything; image or text. i.e. Just put conditional display in the template based on the value the template can see for T_THEME_LANG_NAME or S_USER_LANG, and provide all the language-specific "Date & Time" translations right there in the HTML template.

CSS might still be the way to "define it in one place, and use it across multiple pages", though. Rather than repeating this "manual" translation in multiple HTML templates, if that was needed for a particular string.

User avatar
Tastenplayer
Registered User
Posts: 410
Joined: Thu Jul 03, 2014 9:20 pm
Location: Switzerland
Name: Jutta Koliofotis
Contact:

Re: Language For Styles / CSS Loading

Post by Tastenplayer » Wed Oct 16, 2019 4:07 pm

but putting all my edits on one CSS sheet would mean I have lots of overrides that could have just been deleted from the original CSS sheet.
That's true, you can overwrite or even delete code (And if you do this directly in the prosilver, it applies to all styles. Often you have several styles in one forum). But if you package everything in one css, create a real child, you have everything in a single file and see exactly what has been changed. Should be easier for upgrading to new phpbb versions. (When I make extensive changes to a style, as a lateral entrant I find that time consuming :) ).
I noticed that you can't make some adjustments when everything is inserted in a child.css file. Respect, if I insert all files in style, like in prosilver, then the change takes effect and in child style it doesn't take effect.

Child Style

overall_header

Code: Select all

<link href="{ROOT_PATH}styles/prosilver/theme/normalize.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/base.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/utilities.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/common.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/links.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/content.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/buttons.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/cp.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/forms.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/icons.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/colours.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">

<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_LINK}" rel="stylesheet">

<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">

<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
	<link href="{ROOT_PATH}styles/prosilver/theme/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->

<!-- IF S_PLUPLOAD -->
	<link href="{ROOT_PATH}styles/prosilver/theme/plupload.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->

<!-- IF S_COOKIE_NOTICE -->
	<link href="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->
simple_header

Code: Select all

<link href="{ROOT_PATH}styles/prosilver/theme/normalize.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/base.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/utilities.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/common.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/links.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/content.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/buttons.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/cp.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/forms.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/icons.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/colours.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<link href="{ROOT_PATH}styles/prosilver/theme/responsive.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">

<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_LINK}" rel="stylesheet">
<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">

<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
	<link href="{ROOT_PATH}styles/prosilver/theme/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<!-- ENDIF -->

<!--[if lte IE 8]>
	<link href="{{ T_THEME_PATH }}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
<![endif]-->

<!-- DEFINE $POPUP = 1 -->
According to phpBB.com you should not insert the color.css in the header and simple header, because we want to adapt them (then just delete it in the code) and rename the whole color.css from the prosilver to the style name.css.
(But that's not a real child style anymore. the Child Style.css should only contain your own adjustments and not a complete css from Prosilver).
If you look at the browsers inspector the overrides look a bit messy...
Depending on what kind of change, not just a little bit :mrgreen:
But the changed style is an inherits from prosilver (Translation is somewhat difficult (is and remains an inherits of Prosilver / a child of Prosilver and not a style created from scratch).
My phpBB Style Board & More3.3.0-b2 StyleTBChristmas calendar (Changing style background & song in announcement)
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.

User avatar
Dan Stylez
Registered User
Posts: 278
Joined: Tue Jan 16, 2018 6:17 am

Re: Language For Styles / CSS Loading

Post by Dan Stylez » Wed Oct 16, 2019 5:07 pm

Tastenplayer wrote:
Wed Oct 16, 2019 4:07 pm
That's true, you can overwrite or even delete code. But if you package everything in a css, create a real child, you have everything in a single file and see exactly what has been changed. Should be easier for upgrading to new phpbb versions.
I will give that a try, I'm trying to make it clearer for me to to remember why I made certain changes and also easier for anyone who installs it,
Tastenplayer wrote:
Wed Oct 16, 2019 4:07 pm
Depending on what kind of change, not just a little bit
:lol: Remember the 3.0 days when there used to just be one longgg style sheet, I actually found that easier and in an ideal world I would just have one for common.css and one for colours.css :lol:
EA117 wrote:
Wed Oct 16, 2019 2:03 pm
Without diverging from that existing approach at all, one option would be to provide an image which contains the "Date & Time" label you want to display.

If you did want to pursue text-based, it does make me wonder whether some CSS using the content: property couldn't be leveraged to provide a small amount of "text-based language support" as part of a style. e.g. Class the element that will display your sidebar's label such that you can use ::before or ::after to insert your own "Date & Time" text into that label from the style's /theme/<lang>/stylesheet.css file.

Definitely nothing I've done before, and maybe there is some technical pitfall I'm not recognizing there. But seemed like it should be "an option", for what it's worth.
These are good idea's, thank you, the content idea would be definitely be ideal, I'll play around with them and see what i get :)
Image
When you’re hot, you’re hot... when you’re cold, you’re not hot.

User avatar
Tastenplayer
Registered User
Posts: 410
Joined: Thu Jul 03, 2014 9:20 pm
Location: Switzerland
Name: Jutta Koliofotis
Contact:

Re: Language For Styles / CSS Loading

Post by Tastenplayer » Thu Oct 17, 2019 9:51 am

:lol: Remember the 3.0 days when there used to just be one longgg style sheet, I actually found that easier and in an ideal world I would just have one for common.css and one for colours.css :lol:
I'll never forget that!!!
A friend from DE had created the forum for me and set everything up as I wanted. I had a hunch about phpBB. Previously had a forum on a free server.
When I had not yet decided on a style, I spent a whole night in the ACP adjusting the Prosilver according to my wishes. I found that everything looked great and I was rushing off into the feathers.
The next day I started the forum and was received again by the standard Prosilver.
Of course I hadn't emptied the cache. That was told to me after my fright :lol: .

Language in Style
Language things you want to use in style should be configured / inserted in the phpBB language file. But for public styles this is unfortunately not possible.
Respective you can use in style what is available in phpBB and Prosilver. In my Style Mixture the titles Statistics and Copyright.
Might be difficult to create your own language-dependent codes in / for public styles.
If you could create an extension for it?
My phpBB Style Board & More3.3.0-b2 StyleTBChristmas calendar (Changing style background & song in announcement)
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.

User avatar
Gumboots
Registered User
Posts: 211
Joined: Fri Oct 11, 2019 1:59 am

Re: Language For Styles / CSS Loading

Post by Gumboots » Thu Oct 17, 2019 7:53 pm

EA117 wrote:
Wed Oct 16, 2019 2:03 pm
Of course I don't disagree with MrGoldy's actual point, which was that there aren't any text-based language resources inherent to style development, except what the underlying phpBB translation already provides.
Seems unnecessarily restrictive, but them's the rules I suppose.
Without diverging from that existing approach at all, one option would be to provide an image which contains the "Date & Time" label you want to display. And size it to exactly 1em so that it remains relative to the current text size, etc., to behave "as much like text as possible." You of course have to provide all of those images, for whichever languages you intend for the style to support.
Sure, you can do that, but I wouldn't use it for anything important. It'll be invisible to anyone on a screen reader. You can include alt text on an inline image, but there's not much you can do with a background image. And even alt text is going to be mono-lingual unless you get really tricky with IF statements. Editing images is a nuisance anyway. Personally I'd rather edit language files.
If you did want to pursue text-based, it does make me wonder whether some CSS using the content: property couldn't be leveraged to provide a small amount of "text-based language support" as part of a style. e.g. Class the element that will display your sidebar's label such that you can use ::before or ::after to insert your own "Date & Time" text into that label from the style's /theme/<lang>/stylesheet.css file.
Pseudos work well for this, but have the obvious drawback of only supporting whichever language you use in your CSS. Should be easy to make extra sheets though.

User avatar
Gumboots
Registered User
Posts: 211
Joined: Fri Oct 11, 2019 1:59 am

Re: Language For Styles / CSS Loading

Post by Gumboots » Thu Oct 17, 2019 8:01 pm

Dan Stylez wrote:
Wed Oct 16, 2019 5:07 pm
:lol: Remember the 3.0 days when there used to just be one longgg style sheet, I actually found that easier and in an ideal world I would just have one for common.css and one for colours.css :lol:
AFAIK there would be nothing stopping you from doing this in a custom style. You'd just have to set up your head section calls to suit.

Total default CSS runs around 130kb, which really is getting a bit much for one sheet. Good for machines, but not so good for people. And there's something to be said for splitting off areas that aren't accessed that often, although that does depend on how much code is in them. But a 50 or 60 kb CSS file is pretty manageable if it's well organised.

Is amalgamating files actually against phpBB's rules?

User avatar
Talk19Zehn
Registered User
Posts: 415
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Language For Styles / CSS Loading

Post by Talk19Zehn » Fri Oct 18, 2019 6:12 am

Hello,

Point 1) If I want to change language-based defaults, I'll take my EXT "layoutchanger" (which contains language directories) and overwrite the changes you want and / or add new ones.

Point 2) You only add the part of the original that you want to change

Point 3) AFAIK: The base, - and normalize.css are browser specific supports.
Possibly helpful - Create a Child-Design: https://www.phpbb-theme.de/viewtopic.php?f=21&t=104



Everything seems to work or do I overlook something?

Regards
Last edited by Talk19Zehn on Fri Oct 18, 2019 6:38 am, edited 1 time in total.
World Meteorological Organization (WMO) Weather - Climate - Water
BTW: My own works - phpBB - read more: ongray-design-de or look here: phpBB VT Theme
Extension: phpBB Advent Calendar - Final

User avatar
david63
Registered User
Posts: 16845
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Language For Styles / CSS Loading

Post by david63 » Fri Oct 18, 2019 6:25 am

Talk19Zehn wrote:
Fri Oct 18, 2019 6:12 am
if I want to change language-based defaults, I'll take my EXT "layoutchanger" (which contains language directories) and overwrite the changes
Be aware that is not always guaranteed to work. Language keys will only be overwritten if they are loaded after the "original" keys and you have no way of controlling how those language files are loaded.

For example if you were in viewtopic then that language file would be loaded. If you then add some "overrides" they would be actioned but if another extension either had overrides or in fact reloaded the core file then your overrides would not take effect.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Talk19Zehn
Registered User
Posts: 415
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Language For Styles / CSS Loading

Post by Talk19Zehn » Fri Oct 18, 2019 7:22 am

Yes, this is known to me.

BTW: I add to make my own changes / adjustments. Examples:
commmon.php (de)
'BUTTON_NEW_TOPIC' => 'Neues Thema',
My own language.php
'BUTTON_NEW_TOPIC' => 'Thema erstellen',

memberlist.php (de)
'EDIT_PROFILE' => 'Profil ändern',
My own language.php
'EDIT_PROFILE' => 'Profilangaben ändern',
Or I add at the end *)and apply them (common.php, de) = in a new line after

));

// Begin only for Ongray-Design
$lang = array_merge($lang, array(
'FORUM_RULES_INFO' => 'Hinweise',
'FORUM_RULES_LINK_INFO' => 'Die Hinweise lesen',
'HELLO_WELCOME' => 'Willkommen auf OnGray-Design.de',
# 'HELLO_WELCOME' => 'TEST TEXT ..... Sei willkommen ... und so weiter',
'INFO_INFOPROFILE' => 'Profilangaben',
'MAINTENANCEOGD' => 'Mehr als 8600 Zeilen StyleCodeChanges für 3.2-Final, Font Awesome and much more ...',
'NEW_AQUESTION' => 'Neue Frage',
'ONGRAY_CONTACT_SHORT' => 'Kontakt',
'ONGRAY_IMPRINT' => 'Impressum',
'ONGRAY_SPAM' => 'Deine Konto-Aktivierung wurde als SPAM-Registrierung erkannt. Bitte prüfe alle Einstellungen und versuche es erneut. Bei weiteren Problemen wende Dich an den Administrator',
'PINNWALLS_TITLE' => 'Pinnwand',
'PINNWALLS' => 'Surftipps',
'PORTAL_TITLE' => 'Unser Portal',
'TERMS_CHECKBOX_CONTACT' => 'Bitte bestätige die Nutzungsbedingungen und Datenschutzrichtlinie.',
'USERONGALLERY' => 'Teamgalerie',
));
// End edits only Ongray-Design
languagebuttonnt.png
languageprofileangaben.png
So far I had no problems with that.
Sure, if another extension should have the same, it can come to deviations. This is also known to me. The goal is crucial and it is right that everything cannot be regulated automatically. It takes a powerful knowledge to act individually for your own forum or to create designs for third parties. :)


*) Edit: I create the matching xxx.php files, the appropriate directories in the design (template, theme, images). The calls joins then work when used correctly.

Best regards
World Meteorological Organization (WMO) Weather - Climate - Water
BTW: My own works - phpBB - read more: ongray-design-de or look here: phpBB VT Theme
Extension: phpBB Advent Calendar - Final

User avatar
Talk19Zehn
Registered User
Posts: 415
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Language For Styles / CSS Loading

Post by Talk19Zehn » Fri Nov 15, 2019 12:28 pm

Hello EA117,
EA117 wrote:
Wed Oct 16, 2019 2:03 pm
If you did want to pursue text-based, it does make me wonder whether some CSS using the content: property couldn't be leveraged to provide a small amount of "text-based language support" as part of a style. e.g.
your suggestion I find extremely good and useful to incorporate smaller (text)-details. :) Just tested a little bit. My few non-binding "games":

Code: Select all

a.dst-homepagegoto:before {
	content: "Homepage";
	padding: 0 5px 0 0;
}

a.dst-whippedcreamgoto:before {
	content: "Whipped cream";
	padding: 0 5px 0 0;
}

a.dst-honeypotgoto:before {
	content: "Honeypot";
	padding: 0 5px 0 0;
}

Code: Select all

		<ul>
			<li><a class="dst-homepagegoto" href="#"></a>
				<ul>
					<li><a class="dst-whippedcreamgoto" href="#"></a></li>
					<li><a class="dst-honeypotgoto" href="#"></a>
						<ul>
							<!-- IF S_DISPLAY_SEARCH -->
							<li><a href="{U_SEARCH}">{L_SEARCH_ADV}</a></li>
							<!-- ENDIF -->
						</ul>
					</li>
				</ul>
			</li>
		</ul>

Code: Select all

a.dst-aboutme:before {
	content: "About Me";
	padding: 0 5px 0 0;
}

a.dst-references:before {
	content: "References";
	padding: 0 5px 0 0;
}

Code: Select all

		<div class="panel bg3">
			<div><a class="dst-aboutme" href="#"></a></div>
			<div><a class="dst-references" href="#"></a></div>
		</div>

Code: Select all

.dst-headlinetitlefirst:before {
	content: "Apple Pie";
	font-size: 1.4em;
}

Code: Select all

					<div class="panel bg3">
						<h3 class="dst-headlinetitlefirst"></h3>
						....
						SOME CODE HERE
						....
					</div>

Code: Select all

.dst-departmenttext:before {
	content: "Department";
	font-size: 1.2em;
}

Code: Select all

		<p class="dst-departmenttext" style="height: 16px;"></p>
If a board is only monolingual, it's no problem. I still ponder next to other CSS notations (for example, the content (classes for e.q. de, nl, fr .... (ajar language)) ...
:?: and about the approach of IF-Statements ...

Best regards



Edit: 15.11.2019, 15:57

New Results - Name entries are examples

So, I searched in old processes and read here:
viewtopic.php?t=2293961

My artsmono CSS: artsmonode.css
de (German (Casual Honorifics))

Code: Select all

a.dst-homepagegoto:before {
	content: "Start";
	padding: 0 5px 0 0;
}

a.dst-whippedcreamgoto:before {
	content: "Schlagsahne";
	padding: 0 5px 0 0;
}

a.dst-honeypotgoto:before {
	content: "Honigtopf";
	padding: 0 5px 0 0;
}

a.dst-aboutme:before {
	content: "Über mich";
	padding: 0 5px 0 0;
}

a.dst-references:before {
	content: "Referenzen";
	padding: 0 5px 0 0;
}

.dst-headlinetitlefirst:before {
	content: "Apfelkuchen";
	font-size: 1.4em;
}

.dst-departmenttext:before {
	content: "Abteilung";
	font-size: 1.2em;
}
My artsmono CSS: artsmonoit.css
it (Italian)

Code: Select all

a.dst-homepagegoto:before {
	content: "Inizio";
	padding: 0 5px 0 0;
}

a.dst-whippedcreamgoto:before {
	content: "Panna montata";
	padding: 0 5px 0 0;
}

a.dst-honeypotgoto:before {
	content: "Vaso di miele";
	padding: 0 5px 0 0;
}

a.dst-aboutme:before {
	content: "Chi sono";
	padding: 0 5px 0 0;
}

a.dst-references:before {
	content: "Riferimenti";
	padding: 0 5px 0 0;
}

.dst-headlinetitlefirst:before {
	content: "Torta di mele";
	font-size: 1.4em;
}

.dst-departmenttext:before {
	content: "Dipartimento";
	font-size: 1.2em;
}
Prerequisite is that the respective language packs are loaded in forum mode!

HTML: overall_header.html find

Code: Select all

<!-- EVENT overall_header_head_append -->
put in front of it (add before!)

Code: Select all

<!-- IF S_USER_LANG == 'de' -->
	<link href="{{ T_THEME_PATH }}/artsmonode.css?assets_version={{ T_ASSETS_VERSION }}" rel="stylesheet">
<!-- ENDIF -->

<!-- IF S_USER_LANG == 'it' -->
	<link href="{{ T_THEME_PATH }}/artsmonoit.css?assets_version={{ T_ASSETS_VERSION }}" rel="stylesheet">
<!-- ENDIF -->
Everything seems to work. :)
Last edited by Talk19Zehn on Fri Nov 15, 2019 3:10 pm, edited 3 times in total.
World Meteorological Organization (WMO) Weather - Climate - Water
BTW: My own works - phpBB - read more: ongray-design-de or look here: phpBB VT Theme
Extension: phpBB Advent Calendar - Final

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1213
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Language For Styles / CSS Loading

Post by mrgoldy » Fri Nov 15, 2019 2:59 pm

If you're going this way, I would do something like this:

Code: Select all

<div class="panel bg3">
	<div><a class="dst-aboutme{% if S_USER_LANG != 'en' %} dst-lang-{{ S_USER_LANG }}{% endif %}" href="#"></a></div>
	<div><a class="dst-references{% if S_USER_LANG != 'en' %} dst-lang-{{ S_USER_LANG }}{% endif %}" href="#"></a></div>
</div>

Code: Select all

.dst-aboutme:before,
.dst-references:before {
	padding: 0 5px 0 0;
}

.dst-references:before { content: "About Me"; }
.dst-aboutme.dst-lang-nl:before { content: "Over mij"; }
.dst-aboutme.dst-lang-de:before { content: "Über mich"; }

.dst-references:before { content: "References"; }
.dst-references.dst-lang-nl:before { content: "Referenties"; }
.dst-references.dst-lang-de:before { content: "Referenzes"; }

User avatar
Talk19Zehn
Registered User
Posts: 415
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Language For Styles / CSS Loading

Post by Talk19Zehn » Fri Nov 15, 2019 3:16 pm

Hello mrgoldy, I just edited my post because I found a new solution. Unfortunately I was not shown when sending, that you have posted in the meantime, a post. Not even when I noticed spelling errors, so I edited them repeatedly. :(

Your approach will work well if I look at the code. ;)

Could you still please check if I can proceed according to my edit. That would be helpful.
Thank you very much.

======
Edit: Since I rejected that idea
csslanguagesstyles151113282019.png
and i had edited them, your idea seems now to me the more elegant. 8-) Well solved, thanks.

Best regards
World Meteorological Organization (WMO) Weather - Climate - Water
BTW: My own works - phpBB - read more: ongray-design-de or look here: phpBB VT Theme
Extension: phpBB Advent Calendar - Final

Post Reply

Return to “[3.2.x] Styles Support & Discussion”