[TYPO3] sr_language_menu

Livius Agrippa livius_agrippa at yahoo.com
Fri Mar 31 14:33:04 CEST 2006


Rob De Vries wrote:
> If I'm not mistaken, you need to add another language and use this as 
> your default language, this way you can get all the names in your 
> language menu.
> 
> Rob

Hi Rob,

I have understood this but how can I accomplish this.

Because I have created a site with the default language german and extra 
lang english.
I have created also a second additional language german but in FE these 
languages are rendered as: empty | english | german and when I press 
german indeed switch to the german version but the link is with L=2.

The code is below:
######### Language selector menu ########################
// clear the existing style and wrap
plugin.tx_srlanguagemenu_pi1._CSS_DEFAULT_STYLE >
plugin.tx_srlanguagemenu_pi1.links.stdWrap.split.wrap >



//add new wraps
plugin.tx_srlanguagemenu_pi1.links.stdWrap = <p> | </p>
plugin.tx_srlanguagemenu_pi1.link.NO.stdWrap.wrap = <span 
class="language-no"> | </span>
plugin.tx_srlanguagemenu_pi1.link.INACT.stdWrap.wrap = <span 
class="nav"> | </span>
plugin.tx_srlanguagemenu_pi1.link.CUR.stdWrap.wrap = <span 
class="language-act"> | </span>

/config the menu into a temp object called languageMenu
temp.languageMenu < plugin.tx_srlanguagemenu_pi1
temp.languageMenu.languagesUidsList = 2,1
temp.languageMenu.defaultLayout= 2
temp.languageMenu.useSysLanguageTitle = 0
temp.languageMenu.useSelfLanguageTitle = 1

# German language, sys_language_uid = 0
  config.sys_language_uid = 0
  config.language = de
  config.locale_all = de_DE
  plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0

  [globalVar = GP:L = 0]
  config.sys_language_uid = 0
  config.language = de
  config.locale_all = de_DE
  plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
  [global]

# English language, sys_language_uid = 1
  [globalVar = GP:L = 1]
  config.sys_language_uid = 1
  config.language = en
  config.locale_all = en_EN
  plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
  [global]

How can I make that L=2 to be in fact L=0 and the language menu to be 
German | English

Thank you,

Livius



More information about the TYPO3-english mailing list