Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2017-03-02 18:34:16

moose
Member
Location: Upper Bavaria, Germany
Registered: 2013-01-03
Posts: 35

Piwigo language dependend on given TLD

I registered to different domains for my gallery. They have the same domain name but different TLDs, i.e. <domain name>.de and <domain name>.com .

For both I'm runninig unique Apache vhosts.

When the guests are choosing the .de domain in their browsers they should see German dialogues and when they choose the .com domain they should see English ones.

I installed the 'Extended Description' extension and switching between English and German dialogues work in general. 

But, how can realize when a visitor starts browsing at the .com domain she/he'll see English
dialogues and when she/he will start at the .de domain she/he'll see German ones?

Greetinx

moose

Offline

 

#2 2017-03-02 20:52:10

ddtddt
Piwigo Team
Location: Quetigny - France
Registered: 2007-07-27
Posts: 6672

Re: Piwigo language dependend on given TLD

Hi :-)

Piwigo detect language brother you can desactivate tis with local config


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2017-03-05 10:55:46

moose
Member
Location: Upper Bavaria, Germany
Registered: 2013-01-03
Posts: 35

Re: Piwigo language dependend on given TLD

Thank you very much, ddtddt.

Sadly, your hint doesn't solve my question.

I know the automatic language switching depending on the language choosen in the browser.

But, I'like to enfore piwigo starting with English language when the visitor chose the .com domain
and German when she/he chose the .de domain. Anyway what she/he set as language in her/his browser.

Any other ideas, guys? Would be great!

Greetinx

moose

Offline

 

#4 2017-03-05 11:31:50

ddtddt
Piwigo Team
Location: Quetigny - France
Registered: 2007-07-27
Posts: 6672

Re: Piwigo language dependend on given TLD

ddtddt wrote:

Hi :-)

Piwigo detect language brother you can desactivate tis with local config

Hi :-)

Go to Administration > plugins > Manage > Activate [extension by Piwigo Team] LocalFiles Editor

Go to administration > plugins > localfileEditor > tab config local

add

<?php

// Registering process and guest/generic members get language from the browser
// if language isn't available PHPWG_DEFAULT_LANGUAGE is used as previously
$conf['browser_language'] = false;

?>


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2017-03-06 07:43:34

moose
Member
Location: Upper Bavaria, Germany
Registered: 2013-01-03
Posts: 35

Re: Piwigo language dependend on given TLD

Hi ddtddt,

again, thanks for answering me!

Well, now I know how to disable the automatic language detection in piwigo in detail.

The only thing I'm missing now is how to enforce piwigo to start with a specific language which is not the default language and not the browser language.

May be, an enhancement to the URL string? For example, I could redirect or rewrite

www.<domain>.com => www.<domain>.com/en
www.<domain>.de   => www.<domain>.com/de

or just send it to a specific internal directory like

www.<domain>.com => /var/www/htdocs/en
www.<domain>.com => /var/www/htdocs/de

S.th. like this here

wwww.picture.de?language=DE_de

won't work for me because I'd like to have SEO friendly URL strings only and therfore filter characters like '?' and '=' .

But, how to go ahead from there to let piwigo know I'd like to English oder German dialogues?
Please keep in mind I'd like to run just one instance of piwigo.

Greetinx,

moose

Last edited by moose (2017-03-06 07:50:53)

Offline

 

#6 2017-03-06 13:32:53

flop25
Piwigo Team
Registered: 2006-07-06
Posts: 6566
Website

Re: Piwigo language dependend on given TLD

moose wrote:

But, how to go ahead from there to let piwigo know I'd like to English oder German dialogues?
Please keep in mind I'd like to run just one instance of piwigo.

ok so check out the plugin language switch and its url


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

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2017 · Contact