Announcement

#1 2015-01-04 18:31:34

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Loading a language dependent style sheet

Hello Piwigo,

I am attempting to implement a multi language photo store using Piwigo.

I want to load a customised style sheet for a selected lanaguage.

I have enabled the local files plugin.

It would appear that the local/language/'language'.lang.php is executed before the document is created.

I can make language independent changes to the css using local/css/rules.css.

Hoe do I specify a language dependent css ???

Piwigo version: 2.7.2
PHP version: 5.4.35
MySQL version: 5.5.40-cll
Piwigo URL: http://www.buy-pics-online.com

Offline

 

#2 2015-01-05 07:00:19

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Re: Loading a language dependent style sheet

On examining the document source a 2 character lang code is being set in the <HTML lang>.

My planned solution is as follows :-

1. Change the document template to load a jquery script.
2. The script will get the lang code and load an additonal style sheet based on the lang code.

If any body has any better solutions, I would be very pleased to hear from you !!!

Offline

 

#3 2015-01-05 07:59:41

flop25
Piwigo Team
2006-07-06
7037

Re: Loading a language dependent style sheet

Nothing specific to Piwigo
Google answer me withttp://www.w3.org/International/questions/qa-css-langh


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2015-01-05 12:59:01

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Re: Loading a language dependent style sheet

Bonjour Flop25,

Thank you for the link, that was very helpfull !!!

I can use the 2 character language code as a class selector.

I am making ths changes in local/css/rules.css

Merci beaucoup

Offline

 

#5 2015-01-06 10:21:53

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Re: Loading a language dependent style sheet

Bonjour Flip25, Good morning everybody, ciao a tutti

I have implemented a simple customisation based on the html lang tag.

This seems to be working.

The good news is that the text 'view shopping cart' is now being translated.

The bad news is that the translation is not all ways in the same language as the rest of the document.

I am sure this is a bug, rather than done by design.

I am not sure if this is a problem with the translation, or the PayPal Shopping Cart plugin.

This is driving a lad insane.

Offline

 

#6 2015-01-06 15:02:39

flop25
Piwigo Team
2006-07-06
7037

Re: Loading a language dependent style sheet

could you be more precise in which text in which lang?


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#7 2015-01-07 11:06:31

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Re: Loading a language dependent style sheet

Good morning, buongiorno, bonjour,

I am an Absolute Begineer with Piwigo.

When I go to http://www.getyyimages.co.uk and look at the document source the language code is specfifed
as lang="en-GB" which I think is correct.

Why is Piwigo lang="en" which I think is lazy.

Offline

 

#8 2015-01-07 14:41:23

flop25
Piwigo Team
2006-07-06
7037

Re: Loading a language dependent style sheet

both are valid
http://www.w3.org/TR/html401/struct/dir … ml#h-8.1.1
but you could improve
could open aticket in our bugtracker please? thx http://piwigo.org/bugs/main_page.php


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#9 2015-01-07 15:42:30

Stephen Peacock
Member
United Kingdom
2015-01-04
17

Re: Loading a language dependent style sheet

Good Afternoon, bon apres-midi


It would lokk like http://www.w3schools.com/cssref/sel_lang.asp are lazy too

Example

Select and style every <p> element with a lang attribute value equal to "it" (Italian):
p:lang(it) {
    background: yellow;
}

Try it yourself »


Italians it are lazy,

Sometimes I like to be lazy.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact