Move language select menu to Header.tpl

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
ata_gp
Posts: 28
Joined: Wed Feb 07, 2007 4:34 pm
Location: Madrid (Spain)
Contact:

Move language select menu to Header.tpl

Postby ata_gp » Wed Feb 14, 2007 9:23 am

I try to move the Language toggle from sidebar.tpl to header.tpl, copying the next code:

{if $enableLanguageToggle}
<div class="idioma">
<span class="blockTitle">{translate key="common.language"}</span>
<form action="#">
<select size="1" name="locale" onchange="location.href={if $languageToggleNoUser}'{$currentUrl}{if strstr($currentUrl, '?')}&{else}?{/if}setLocale='+this.options[this.selectedIndex].value{else}('{url page="user" op="setLocale" path="NEW_LOCALE" source=$smarty.server.REQUEST_URI escape=false}'.replace('NEW_LOCALE', this.options[this.selectedIndex].value)){/if}" class="selectMenu">{html_options options=$languageToggleLocales selected=$currentLocale}</select>
</form>
</div>
{/if}

I've pasted it into the <div id="headerTitle"></div>. Sometimes it works and sometimes not. What's the problem.

I've selected english and spanish at the Language Settings.

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Postby asmecher » Wed Feb 14, 2007 10:02 am

Hi ata_gp,

Could you describe the intermittent behavior you're seeing from this modification? We don't generally provide support for modified versions of OJS, but I might be able to suggest a few things to look into.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/

ata_gp
Posts: 28
Joined: Wed Feb 07, 2007 4:34 pm
Location: Madrid (Spain)
Contact:

Postby ata_gp » Wed Feb 14, 2007 11:16 am

Hi Alec,

It's quite difficult to explain the intermittent behavior, 'cos it only appears in some pages but not always. For instance, as administrator, if I go to ">Site adiministrator", surprise: the lenguage selector appears at the header as I wanted. But, if I choice "homepage" it disappears.

I don't know... thanks for your help.

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

Postby asmecher » Wed Feb 14, 2007 11:32 am

Hi ata_gp,

Do you have a URL you could send me? If you'd rather not make it public, you can contact me personally via this bulletin board.

Regards,
Alec Smecher
Open Journal Systems Team


Return to “OJS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest