[TYPO3] Domain to language assignment
Stefan Steinbeck
stefan_steinbeck at yahoo.de
Mon Jan 8 15:21:23 CET 2007
Hi!
I am looking since a couple of days for a solution to assign languages
to different domains and vice versa. In the following I have specified
my problems and the approached I tried to solve them.
It would be really great if someone could take the time to read my (a
bit lengthy discussion) of this problem and find a solution!
Thanks and cheers,
Stefan
Problem:
----------
In a multi language typo3 site there should be an defined assignment
between the domains of that site and the shown page languages. This can
be split into three requirements:
* Contents of the domain xyz.abc should be display in the language
correlated to abc. The pages of a domain info.de should therefor be
displayed in german.
* Links to pages in different languages then the actual shown should
link to the corresponding URL. An example where this should be
implemented is is the extension "Language Selector".
* There should be a TypoScript condition for this language selection
mechanism.
The solution should additionally work with the extension "RealURL".
This Problem has been addresses multiple times in the recent months (see
references) but no complete solution for this problem has been found.
Approach:
-----------
The first approach would be to use additional to the TypoScript
language condition a domain condition. An example language assignment
for the two languages german (default language) and english to the
respective domains .de and .com would look like this:
[globalString = ENV:HTTP_HOST = *xyz.de]
config {
sys_language_uid = 0
language = de
locale_all = de_DE
}
[globalString = ENV:HTTP_HOST = *xyz.com]
config {
sys_language_uid = 1
language = en
locale_all = en_US
}
[globalVar = GP:L = 0]
config {
sys_language_uid = 0
language = de
locale_all = de_DE
}
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = en
locale_all = en_US
}
[global]
This would set the language for the text and other content of the page
properly. But it does not (could not) set the global L variable. Hence
extensions which are base on that variable would show their content in
the wrong language and links would point to the default language and
domain.
In a second step on could like to update the config.baseURL TypoScript
variable corresponding to the given language and domain like it was done
in the example above. But this would make a domain "change" impossible.
Hence one would not be able to change the language (f.e. change form
english to german on the com page).
The third approach was to manually rewrite the global L variable by a
function to point to the right value if it was no set before. This was
taken from reference nr.3.
References:
-------------
1 Multiple languages with multiple domains in a single page tree;
Joost van Berckel <berckel at gmail.com>; typo3.english list; 05.12.06;
news://news.netfielders.de:119/mailman.1.1165350244.4140.typo3-english@lists.netfielders.de
2 domain name problem;
Rakowski Tomasz <raczek at open.infi.pl>; typo3.english list; 25.11.06;
news://news.netfielders.de:119/mailman.1.1164463885.26316.typo3-english@lists.netfielders.de
3 Force Language and L-parameter;
Søren Schaffstein <soeren.schaffstein at media-lights.de>;
typo3.english list; 13.11.06;
news://news.netfielders.de:119/mailman.1.1163424292.21672.typo3-english@lists.netfielders.de
4 Multidomain - multilanguage;
Logi Huldar Gunnlaugsson <logi at spuni.is>; typo3.english list; 09.10.06;
news://news.netfielders.de:119/mailman.12168.1160405207.20124.typo3-english@lists.netfielders.de
5 Multi domains multi language site;
Patrick Boisclair <illustra at videotron.ca>; typo3.english list; 13.05.06;
news://news.netfielders.de:119/mailman.1.1147536894.13674.typo3-english@lists.netfielders.de
6 Multiple languages with multiple domains in a single page tree?;
Rick Janda <Rick.Janda at gmx.de>; typo3.english list; 06.04.06;
news://news.netfielders.de:119/mailman.1.1144332283.20933.typo3-english@lists.netfielders.de
More information about the TYPO3-english
mailing list