[TYPO3] Multi domains multi language site

JoH info at cybercraft.de
Tue May 16 08:34:08 CEST 2006


>>>> I have a problem, here is my problem:
>>>>
>>>> I have 2 domains (www.french.com and www.english.com (by example))
>>>> The 2 domains point on the same pagetree.
>>>> If I'm on www.french.com, I see the french version and if I'm on
>>>> www.english.com I see the english version. All of this without
>>>> changing the domain URL (www.french.com/index.php?id=120&L=fr |
>>>> www.english.com/index.php?id=120&L=en ).
>>>>
>>>> Is it possible ?
>>> I think the two things are different. The typo3 can handle virtual
>>> domains. This means that you don't have to edit you httpd.conf
>>> instead of this you can create more trees withhin one typo3
>>> installation and you can assing domain items for the root pages of
>>> every trees. See the Web/Lists/Create new record.
>>> If you'd have just one tree, in this case you can create
>>> translations for every page items. In this case you see the
>>> translations so. www.domain.com/index.php?id=120&L=en
>>
>> It has nothing to do with single tree against multiple tree concepts.
>> It's all about using the proper conditions.
>>
>> You can see it here:
>> www.xposign.com
>> or
>> www.xposign.de
>>
>> This is the language related typoscript snippet from this site:
>>
>> [globalString = HTTP_HOST= *xposign.de]
>>
>> config {
>>  sys_language_uid = 0
>>  language = de_DE
>>  locale_all = de_DE at euro
>> }
>>
>> [globalString = HTTP_HOST= *xposign.com]
>>
>> config {
>>  sys_language_uid = 1
>>  language = en_IE
>>  locale_all = en_IE at euro
>> }
>>
>> [global]
>>
>> And for the language switch:
>>
>> temp.langmenu = COA
>> temp.langmenu {
>>   10 = TEXT
>>   10 {
>>     value = <img src="fileadmin/images/deutsch.gif" border=0>
>>     wrap = <td valign="bottom">|</td>
>>     typolink {
>>       addQueryString = 1
>>       parameter.dataWrap = http://www.xposign.de/{TSFE:id}.0.html
>>     }
>>   }
>>   20 = TEXT
>>   20 {
>>     value = <img src="fileadmin/images/english.gif" border=0>
>>     wrap = <td valign="bottom">|</td>
>>     typolink {
>>       addQueryString = 1
>>       parameter.dataWrap = http://www.xposign.com/{TSFE:id}.0.html
>>     }
>>   }
>> }
>>
>> Should be working with some slight modifications.
>>
>> Joey
>>
> Thank you Joey, my other problem is how to point to domain on the same
> place to use single tree concept ?

??? - the xposign site is actually using a single tree concept.
Both domains xposign.com and xposign.de are pointing to exactly the same
startpage using the same pagetree with translations on the same page.
The links are created using TSFE:id to keep the user on exactly this same
page while switching from English to German or vice versa.
The condition is used to set the language based on the domainname instead of
&L=123 which is IMHO the better solution if you got two different domains or
subdomains available.
&L=123 is just a workaround if you haven't got any other domain available
but it is not mandatory.
You could call it &language=123, &myParameter=123 or even remove it
completely.
The only thing you have to do is to create a condition based on your
preferred indicator to set sys_language_uid, language, locale_all and maybe
some strftime and other translation settings.
These are the mandatory parts.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list