[TYPO3-english] Language menu not rendering links

Celso Reeks typo3 at distopia.com
Sat Dec 31 15:00:43 CET 2011


Hello!


Having a bit of a problem with multiple language site.

No matter what I do, Typo3 hasn't been generating URLs for translated pages.

For example: my home page (actually the only page I have fully translated, for testing purposes) has the original URL:

http://naudeicaros.distopia.com/


I have been able to create a HMENU for the language menu, following the instructions from the "Frontend Localization Guide".  This menu can be seen on the top right corner of the page, and should link to the following languages: PT (Portuguese, default language), EN (English) and ES (Spanish, still to be translated).

If you check the links on the menu, Portuguese version has link to same page.  But so does English, when it should link to the english version URL (for other instalations, would be something like http://naudeicaros.distopia.com/en/).

BUT, if I type in a forced URL, using the sys_language_uid number, I finally hit a (not so well) translated page:

http://naudeicaros.distopia.com/?L=4



Another curious thing: I also translated a subpage (Contact).  In the English version page, this item appears translated in the menu and it actually does have a unique link (http://naudeicaros.distopia.com/contact/).  Weird thing is that, when loaded, the page still has the original portuguese content.  In order to see the translation, I have to proceed just as with the home page, finally viewing the english version in either of these URLs:

http://naudeicaros.distopia.com/contact/?L=4
http://naudeicaros.distopia.com/contato/?L=4



Does anyone have a clue on what I'm doing wrong?  Typo3 version is 4.6.0 and this is the Typoscript used:


#####################


# Language Settings
config.uniqueLinkVars = 1
config.sys_language_overlay   = 1
config.sys_language_mode   = content_fallback
config.sys_language_uid = 0
config.locale_all = pt_BR
config.language = br
config.htmlTag_langKey    = pt-BR
config.linkVars = L


# Spanish language, sys_language.uid = 3
[globalVar = GP:L = 3]
config.htmlTag_langKey = es-ES
config.sys_language_uid = 3
config.language = es
config.locale_all = es_ES
[global]

# English language, sys_language.uid = 4
[globalVar = GP:L = 4]
config.sys_language_uid = 4
config.language = en
config.htmlTag_langKey = en-GB
config.locale_all = en_GB
[global]


################


lib.langmenu = HMENU
lib.langmenu {
	special = language
	special.value = 0,4,3
	special.normalWhenNoLanguage = 0
	1 = TMENU
	1 {
       # Normal link to language that exists:
		NO = 1
		NO.allWrap = |*| | *  |*| |
		NO.linkWrap = <span> | </span>
		NO.stdWrap.setCurrent = PT || EN || ES
		NO.stdWrap.current = 1
	# Current language selected:
		ACT < .NO
		ACT.linkWrap = <span class="act"> | </span>
	# Language that is NOT available:
		USERDEF1 < .NO
		USERDEF1.linkWrap = <span class="nada"> | </span>
		USERDEF1.doNotLinkIt = 1
	}
}

###############


Oddly enough, this doesn't differ from what I've read in the guide or here on the list.  And it's also quite similar to another multilanguage Typo3 website I setup years ago, on a system that still runs Typo3 4.0.1.


Thanks for any help!
Celso


More information about the TYPO3-english mailing list