[TYPO3-english] Localization problem - non TemplaVoila site - Typo3 version 4.0.2

Karl Wallace karl.wallace at roomthree.com
Tue Dec 9 18:53:57 CET 2008


Hi List

I encountered a problem when I added multilingual functionality to an
old website built by another developer.
It uses Typo3 version 4.0.2 and does not use TemplaVoila for templating.
I have read the localization guide and successfully created multilingual
sites myself (though using TemplaVoila). I have also searched the list
archive for similar problems.

The problem is that any content that is translated in the NORMAL content
area is displayed twice in the front end. It displays only once as it
should in the backend. This happens for each language enabled. So if I
click on the flag icon to switch for french or german or italian I will
see two versions of the translated content element.

I have checked the tt_content table manually and there is no duplication
occuring there.

I have included the relevant sections of the Typoscript setup below. I'm
hoping that this might be a previously discovered bug since it's an old
version of typo3. Any advice is greatly appeciated.

I can provide clarification if anyone has any questions. I can also
provide sreenshots or a log in to the site itself if needed.

Thanks in advance

Karl

Relevant typoscript set up is as follows:

## Config 

config.linkVars = L
config.uniqueLinkVars = 1
config.language = en
config.locale_all = en_UK
config.htmlTagLangKey = en-UK
config.sys_language_uid = 0
config.xhtml_cleaning=all

config.sys_language_overlay = 1
config.sys_language_mode = content_fallback

config.intTarget = _self         # Internal links in the same window
config.extTarget = _blank        # External links in new window       
config.doctype =  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

config.titleTagFunction = user_pagetitle_class->changetitle

content.pageFrameObj = 

[globalVar = GP:L=1]

page.config {
   sys_language_uid = 1
   language = fr
   locale_all = fr_FR
   metaCharset = utf-8
   htmlTag_langKey = fr
}

[global]

[globalVar = GP:L=2]
page.config {
   sys_language_uid = 2
   language = de
   locale_all = de_DE
   metaCharset = utf-8
   htmlTag_langKey = de
}
[global] 


[globalVar = GP:L=3]
page.config {
   sys_language_uid = 3
   language = it
   locale_all = it_IT
   metaCharset = utf-8
   htmlTag_langKey = it
}
[global] 

# config.admPanel = 1

config.doctype =  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


## Localization menu:

lib.langMenu = HMENU

lib.langMenu {

special = language
special.value = 0,1,2,3,4,5
special.normalWhenNoLanguage = 0

1 = GMENU

1.NO {

XY = [5.w]+4, [5.h]+4
backColor = white
5 = IMAGE
5.file = EXT:cms/tslib/media/flags/flag_uk.gif ||
EXT:cms/tslib/media/flags/flag_fr.gif  ||
EXT:cms/tslib/media/flags/flag_de.gif ||
EXT:cms/tslib/media/flags/flag_it.gif ||
EXT:cms/tslib/media/flags/flag_es.gif ||
EXT:cms/tslib/media/flags/hl_se.gif
5.offset = 2,2

}

1.ACT < lib.langMenu.1.NO
1.ACT=1
1.ACT.backColor = black
1.USERDEF1 < lib.langMenu.1.NO
1.USERDEF1=1
1.USERDEF1.5.file = EXT:cms/tslib/media/flags/flag_uk_d.gif  ||
EXT:cms/tslib/media/flags/flag_fr_d.gif  ||
EXT:cms/tslib/media/flags/flag_de_d.gif ||
EXT:cms/tslib/media/flags/flag_it_d.gif ||
EXT:cms/tslib/media/flags/flag_es_d.gif ||
EXT:cms/tslib/media/flags/hl_se.gif
1.USERDEF1.noLink = 0
1.USERDEF2 < lib.langMenu.1.USERDEF1
1.USERDEF2.backColor = green

} 

plugin.tx_danewslettersubscription_pi1 {
  email_from = info at info.com
  email_fromName = contact
  replyTo = info at info.com
}


plugin.tx_automaketemplate_pi1 {

  content = FILE
	
  content.file = fileadmin/html/generic.html

  elements {

    BODY.all = 1

    BODY.all.subpartMarker = DOCUMENT_BODY

    HEAD.all = 1

    HEAD.all.subpartMarker = DOCUMENT_HEADER

    HEAD.rmTagSections = title

    UL.all = 1
    
    DIV.all = 1

  }

  relPathPrefix = fileadmin/html/

}

includeLibs.pagetitle = typo3conf/ext/mf_pagetitle/pagetitle.php

plugin.mf_pagetitle.title = {page:title} - Title of page

config.titleTagFunction = user_pagetitle_class->changetitle


temp.topLinks = HMENU

temp.topLinks.special = list

temp.topLinks.special.value = 74,4,12,15,32

temp.topLinks.1 = TMENU

temp.topLinks.1 {

 	expAll = 0
	
	wrap = <ul> | <li id="bandwidthSwitchTop"><a href="#"
onclick="setCookie('isHighBandwidth',1,365)">High Speed
Version</a></li></ul>

  NO.allWrap =  <li> | &#x7c;</li>
  
}

# jk: block menu 1.2 by setting it to hmenu

temp.topLinks.2 = HMENU

temp.nav = HMENU

temp.nav.entryLevel = 0

temp.nav.special = list

temp.nav.special.value = 2,13,11,10,9,8,50,7,6,5,3,16,15,12,48,35

temp.nav.1 = TMENU

temp.nav.1 {

  wrap = <ul> | </ul>

	expAll = 0
	
	collapse = 0

  NO.allWrap = <li> | </li>

  ACT = 1
  ACT.allWrap = <li class="active"> | </li>
  
  CUR = 1
  CUR.doNotLinkIt = 1
  CUR.allWrap = <li class="active"><a href="#"> | </a></li>
}

temp.nav.2 = TMENU

temp.nav.2 {

	expAll = 0
	
	collapse = 1
	
  wrap = <ul> | </ul>

  NO.allWrap = <li> | </li>

  ACT = 1
  ACT.allWrap = <li class="active"> | </li>
  
  
  CUR = 1
  CUR.doNotLinkIt = 1
  CUR.allWrap = <li class="active"><a href="#"> | </a></li>
  
}  
 
 temp.rightColumn = 	CONTENT

 temp.rightColumn {
  
     table = tt_content

     select.where = colPos = 2
	   
     slide = -1	
	 
	 wrap = <div class="item"> | </div>

   }
     		
temp.mainTemplate = TEMPLATE

temp.mainTemplate {

  template =< plugin.tx_automaketemplate_pi1

    # Select only the content between the <body>-tags

  workOnSubpart = DOCUMENT_BODY

  subparts.navOne < temp.topLinks  
  
  subparts.navTwo < temp.nav
  
  subparts.navLang < lib.langMenu
      
  subparts.content = CONTENT

  subparts.content {
  
    table = tt_content

    select.orderBy = sorting

    select.where = colPos = 0
    
    languageField=sys_language_uid
  
  }

    subparts.banner = TEXT
  
  subparts.banner.value (
	  <img src="fileadmin/html/images/bannerImages/{$bannerImage}"
/>
  )
  
    
  subparts.bandwidthOptionSection = 
  
  subparts.teaserBoxSection = CONTENT

  subparts.teaserBoxSection {
  
    table = tt_content

    select.orderBy = sorting

    select.where = colPos = 3
  
  }
  
  subparts.columnRightContentArea < temp.rightColumn
  
 styles.content.links.target = _self

}


temp.headTemplate = TEMPLATE

temp.headTemplate {

  template =< plugin.tx_automaketemplate_pi1

    # Select only the content between the <head>-tags

  workOnSubpart = DOCUMENT_HEADER

}

page = PAGE

page.bodyTag=<body
onload="checkCookie();setTodayTomorrow();alternate('content');">

page.typeNum = 0

page.10 < temp.mainTemplate

page.headerData.5 < temp.javascript.bandwidthSelector 

page.headerData.10  < temp.headTemplate

page.headerData.15 < temp.javascript.tableStyles

page.headerData.20 = TEXT
page.headerData.20.value = <meta name="verify-v1"
content="ZxfSq2m9i/9s4umvEWpq3XXhQdmdmV4gPdMxW33EuQo=" />

tt_content.stdWrap.dataWrap >

tt_content.table.20.tableParams_0.border = 0
tt_content.table.20.tableParams_0.cellpadding = 0
tt_content.table.20.tableParams_0.cellspacing = 0
tt_content.table.20.tableParams_1.border = 0
tt_content.table.20.tableParams_1.cellpadding = 0
tt_content.table.20.tableParams_1.cellspacing = 0
tt_content.table.20.tableParams_0.border = 1
tt_content.table.20.tableParams_1.border = 1
tt_content.table.20.tableParams_0.border = 0
tt_content.table.20.tableParams_1.border = 0
tt_content.table.20.tableParams_1.cellspacing = 1
tt_content.table.20.tableParams_0.cellspacing = 1
tt_content.table.20.tableParams_0.cellspacing = 2
tt_content.table.20.tableParams_1.cellspacing = 2

tt_content.mailform.20.target = _top

includeLibs.tx_browserpagetitle =
typo3conf/ext/browser_page_title/class.tx_browserpagetitle.php

config.titleTagFunction = tx_browserpagetitle->getTitle

plugin.browser_page_title {

    defaultTitle = {title} - Mespil Hotel, Dublin, Ireland

    currentTitle = {tx_browserpagetitle_browser_title}

}

includeLibs.dh_linklayout = EXT:dh_linklayout/class.tx_dhlinklayout.php

tt_content.text.20.parseFunc {
  tags.link.typolink.userFunc = tx_dhlinklayout->main
  tags.link.typolink.userFunc {
    linkImgExt.file = {$plugin.tx_dhlinklayout.linkImgExt.file}
    linkImgExt.wrap = {$plugin.tx_dhlinklayout.linkImgExt.wrap}
    aTagParamsExt = {$plugin.tx_dhlinklayout.aTagParamsExt}
    linkImgInt.file = {$plugin.tx_dhlinklayout.linkImgInt.file}
    linkImgInt.wrap = {$plugin.tx_dhlinklayout.linkImgInt.wrap}
    aTagParamsInt = {$plugin.tx_dhlinklayout.aTagParamsInt}
    linkImgMailto.file = {$plugin.tx_dhlinklayout.linkImgMailto.file}
    linkImgMailto.wrap = {$plugin.tx_dhlinklayout.linkImgMailto.wrap}
    aTagParamsMailto = {$plugin.tx_dhlinklayout.aTagParamsMailto}
    linkImgFile.file = {$plugin.tx_dhlinklayout.linkImgFile.file}
    linkImgFile.wrap = {$plugin.tx_dhlinklayout.linkImgFile.wrap}
    aTagParamsFile = {$plugin.tx_dhlinklayout.aTagParamsFile}
    
  }
  tags.typolist.default.parseFunc.tags.link.typolink.userFunc <
.tags.link.typolink.userFunc
}

lib.stdheader.stdWrap.typolink.userFunc <
tt_content.text.20.parseFunc.tags.link.typolink.userFunc





More information about the TYPO3-english mailing list