EnglishStep 1. Select languages in the "Language Switch" Plugin:
Step 2. Open file /plugins/language_switch/flags.tpl
Step 3. Comment out code :
<!--
<li>{strip}<a id="languageSwitchLink" title="{'Language'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
<span class="pwg-icon" style="background:url('{$lang_switch.Active.img}') center center no-repeat;"> </span><span class="pwg-button-text">{'Language'|@translate}</span>
</a>
<div id="languageSwitchBox" class="switchBox">
<div class="switchBoxTitle">{'Language'|@translate}</div>
{foreach from=$lang_switch.flags item=flag name=f}
<a rel="nofollow" href="{$flag.url}"><img class="flags" src="{$flag.img}" alt="{$flag.alt}"> {$flag.title}</a>
{if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
{/foreach}
</div>
{/strip}</li>
-->
Step 4. Add code in the flags.tpl file:
<li>
{foreach from=$lang_switch.flags item=flag name=f}
<a rel="nofollow" href="{$flag.url}"><img style="padding-left: 3px" class="flags" src="{$flag.img}" alt="{$flag.alt}"> </a>
{if ($smarty.foreach.f.index+1)%3 == 0}<br>{/if}
{/foreach}
</li>
Stap 5. Save file and upload on the Server
Hello
it seems you need to add new trigers to the plugin, in order to generate and assign the variables
yes. the login page calls header.tpl
the switch selector is there, only the
<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:
<img src="" alt="" title=""/>
you've header on login page ?
well, now works 90%... ;)
I put it in header.tpl hard coded.
<img src="{$lang_switch.Active.img}" alt="{$lang_switch.Active.alt}" title="{$lang_switch.Active.alt}"/>
<ul>
<li><a href="{$ACTUAL_URL}?/categories&lang=es_ES"><img src="language/es_ES/es_ES.jpg">Spanish</a></li>
<li><a href="{$ACTUAL_URL}?/categories&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 :(
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
:(
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:
<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
Can you give me a link and webmaster pass for your gallery ?
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. :)
ddtddt wrote:
how language would you want ?
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
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...
you can read post:116987
how language would you want ?
you can use html tag
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