[TYPO3-dev] Not equal condition

JoH asenau info at cybercraft.de
Sun May 20 16:12:50 CEST 2007


>> for this cases i use an extension template with the relevant
>> settings, that is included with each root template.
>
> I do that, also, but the problem becomes when I have the same L
> values for different sites with different default language.

Don't see the problem so far.
To give you an example lets assume there are four languages like i.e. for a
swiss company:

They got German, French, Italian plus English for international clients with
other languages.
They got different domains for each country.
The company itself is located in Zurich so their default language (0) in the
BE is German.
The rest is done via translations using a one tree concept.

The Be languages are:

0 = German
1 = French
2 = Italian
3 = English

The domains are:

domain.ch
domain.it
domain.fr
domain.com

And this is the setup:

[globalString =  IENV:HTTP_HOST = *domain.ch]
config {
    sys_language_uid = 0
    language = de
    locale_all = de_DE.UTF-8
}
[globalString =  IENV:HTTP_HOST = *domain.it]
config {
    sys_language_uid = 1
    language = it
    locale_all = it_IT.UTF-8
}
[globalString =  IENV:HTTP_HOST = *domain.fr]
config {
    sys_language_uid = 2
    language = fr
    locale_all = fr_FR.UTF-8
}
[globalString =  IENV:HTTP_HOST = *domain.com]
config {
    sys_language_uid = 3
    language = en
    locale_all = en.UTF-8
}
[globalVar = GP:L = 1]
config {
    sys_language_uid = 0
    language = de
    locale_all = de_DE.UTF-8
}
[globalVar = GP:L = 2]
config {
    sys_language_uid = 1
    language = it
    locale_all = it_IT.UTF-8
}
[globalVar = GP:L = 3]
config {
    sys_language_uid = 2
    language = fr
    locale_all = fr_FR.UTF-8
}
[globalVar = GP:L = 4]
config {
    sys_language_uid = 3
    language = en
    locale_all = en.UTF-8
}
[global]

The difference to your setup is:
Since there is no law that forces me to use L=0 as a trigger for the BE
default language I don't use any L=0 parameter but start with L=1 for the
default language instead.
After all "L=x" is just a GET parameter that can mean anything I want. So if
I want to use L=1 to get records without any sys_language_uid I am free to
do so.
This way I can make sure that L=0 always means: L=False.
So the domain without any L parameter will always point to it's own default
language, while L=1 will trigger the BE default language.
Im quite sure (but didn't test it) that you can even use this together with
the realURL extension, so that the default language of each domain (i.e.
domain.fr + L=3) will always be rendered without an additional language part
in the path.
So instead of
*domain.fr/fr/somepage
it would be
*domain.fr/somepage

0 is a special case but usually there is no need for a != condition since we
got [else] and we can override defaults

[condition = something]
[else]
Something else
[global]

or

Something else
[condition = something]
Something else >
[global]

will work for anything but zero.

So I think it's a good idea anyway to introduce != or "= FALSE" for
conditions but your language problem can be easily solved without it.

HTH

Joey

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






More information about the TYPO3-dev mailing list