[TYPO3-english] Menu of pages having mix of default languages

Xavier Perseguers typo3 at perseguers.ch
Fri Nov 13 18:31:06 CET 2009


Hi,

I have following site structure:

root
|-- website1 (sys_language = 0 is French)
|   |-- some pages in French
|   `-- mount point to shared
`-- shared (sys_language = 0 is English)
     |-- page1
     `-- page2

When showing website1, I have a menu that shows both pages from website1 and menu of pages under shared. This is done this way:

[loginUser = *]
lib.menu.shared = HMENU
lib.menu.shared.special = directory
lib.menu.shared.special.value = id-of-mount-point,id-of-shared

lib.menu.shared.1 = TMENU
// standard configuration

And on mount point, I have an additional template to change the default language. It basically change sys_language_uid = 0 to English and configures French to become sys_language = 2 and update the 
language menu to use other sys_language_uids (my website has four languages English, French, German and Italian which either of them may be used as primary language in a website while shared pages are 
created in English and then translated).

config {
	sys_language_uid = 0
	language = en
	locale_all = en_GB
}

page {
	config.htmlTag_langKey = en
	meta.language = en
}

	# French
[globalVar = GP:L=2]
	config.sys_language_uid = 2

	# Italian
[globalVar = GP:L=3]
	config.sys_language_uid = 3

[global]

lib.links.languages {
	special.value = 1,0,2,3
}

This works great except for the menu of shared pages when being on non-shared page. It generates the menu with page titles having sys_language_uid=0 (default language of the website) and as such, 
shared pages are shown in English.

Question: How may I generate a menu for another sys_language_uid? I would like my menu to be generated with sys_language_uid = 2 in this case.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-english mailing list