Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2012-04-20 16:21:45

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

language switch not only in index.php

hi everybody!

I want to have the language_switch plugin in another page. for example in about.php

I noticed in the index.tpl that this action {$PLUGIN_INDEX_ACTIONS} show it, put when I put it in about.tpl don't works. :(

where I can have more information about this?

thanks a lot!

peter


using Piwigo 2.3.3

Offline

#2 2012-04-20 17:57:40

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

Re: language switch not only in index.php


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.

Online

#3 2012-04-24 21:16:40

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

hi ddtddt! thanks for your answer.

I will try it. the only problem is I don't need it in the MENUBAR. I need it in the top of the page :)

maybe I can change it. want something like {$LANGUAGE} that uses the flags.tpl of the plugin.

thank you!

peter

Last edited by peter.w.lampke (2012-04-24 21:24:02)

Offline

#4 2012-04-24 21:47:52

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

Re: language switch not only in index.php

how language would you want ?


you can use html tag


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.

Online

#5 2012-04-24 21:49:49

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

Re: language switch not only in index.php


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.

Online

#6 2012-04-26 23:39:57

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

hi ddtddt...

no. don't works... I tried all. {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}

I tried to put it on header.tpl but nothing...

Offline

#7 2012-04-26 23:58:41

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

Re: language switch not only in index.php

peter.w.lampke wrote:

no. don't works... I tried all. {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
I tried to put it on header.tpl but nothing...

Use this is a bad idea, other plugin can use this


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.

Online

#8 2012-04-26 23:58:52

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

Re: language switch not only in index.php

ddtddt wrote:

how language would you want ?


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.

Online

#9 2012-04-27 00:00:40

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

hi ddtddt!

> Use this is a bad idea, other plugin can use this
ah! ok. I understand now.

I want to use english and spanish... only 2 languages for now. :)

Offline

#10 2012-04-27 06:57:20

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

Re: language switch not only in index.php

Can you give me a link and webmaster pass for your gallery ?


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.

Online

#11 2012-04-27 07:53:12

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

hey ddtddt!

ddtddt wrote:

Can you give me a link and webmaster pass for your gallery ?

ah! I think I know what you want to do. ;) you want to try the 'Personal Plugin' right? (the solution from plg in post 116987)

well, I tried it and works 90%. the problem are this 2 points:

1.- in the page: login.php I cannot see the selected language.

I mean, in each another page you can see the flag of the selected language. To show the flag of the active language, I use this line:

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>

2.- the link when you try to change the language is strange.

I mean, when I use the switcher in the index.php to change the language to english I see that:
http://www.domain.com/index.php?/catego … lang=en_UK

but when I am in help.php I see that:
http://www.domain.com/?lang=en_UK

instead something like:
http://www.domain.com/help.php?lang=en_UK

nice eh? ;) maybe anyone can help?

thanks again!

peter

Last edited by peter.w.lampke (2012-04-27 08:34:26)

Offline

#12 2012-04-27 08:33:47

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

oh no! I discovered another problem with this 'Personal Plugin'.

In backend. Photos > Batch Manager I see this error:

Warning: make_section_in_url wrong type for category in /public/include/functions_url.inc.php on line 343

Warning: make_section_in_url category id not numeric in /public/include/functions_url.inc.php on line 346

Warning: make_section_in_url category name not set in /public/include/functions_url.inc.php on line 349

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /public/include/functions_url.inc.php on line 351

Warning: make_section_in_url category permalink not set in /public/include/functions_url.inc.php on line 353

Warning: Cannot modify header information - headers already sent by (output started at /public/include/functions_url.inc.php:343) in /public/include/page_header.php on line 103

:(

Offline

#13 2012-04-29 17:27:51

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

well, now works 90%... ;)

I put it in header.tpl hard coded.

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>
<ul>
    <li><a href="{$ACTUAL_URL}?/categories&amp;lang=es_ES"><img src="language/es_ES/es_ES.jpg">Spanish</a></li>
    <li><a href="{$ACTUAL_URL}?/categories&amp;lang=en_UK"><img src="language/en_UK/en_UK.jpg">English</a></li>
</ul>

the only problem persists in login.php, cannot see the selected language :(

Offline

#14 2012-04-29 17:32:19

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

Re: language switch not only in index.php

you've header on login page ?


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.

Online

#15 2012-04-29 17:45:48

peter.w.lampke
Member
Registered: 2012-01-16
Posts: 23

Re: language switch not only in index.php

yes. the login page calls header.tpl

the switch selector is there, only the

Code:

<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>

don't works. the selected language flag is not showed. the HTML code shows:

Code:

<img src="" alt="" title=""/>

Offline

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013