OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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.
ata_gp
 
Posts: 28
Joined: Wed Feb 07, 2007 4:34 pm
Location: Madrid (Spain)

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/
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm

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.
ata_gp
 
Posts: 28
Joined: Wed Feb 07, 2007 4:34 pm
Location: Madrid (Spain)

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
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests