Zum Inhalt springen

Sprachen und Useragent - Bedingungen kombinieren

Erstellt am 23. November 2010 · 1 Antwort · letzte Antwort am 26. Januar 2011

Tags: Frage

wiz ·

Hallo Folks,

Ich habe folgendes Problem: Für eine Webseite gibt es eine iPhone- und iPad-Navigation,

Standardmäßig wird L=3 als erste Sprache für den User gezeigt, sie ist definiert wie folgt:

config.sys_language_uid = 3
config.language = am
config.htmlTag_langKey = am
config.locale_all = am_AM


[globalVar = GP:L = 0]
config.sys_language_uid = 0
config.language = en
config.htmlTag_langKey = en
config.locale_all = en_EN

[global]

Nun habe ich das Problem, wenn ich die Sprache und

[useragent = *iPad*]

oder

[useragent = *iPhone*]

verbinden will, kann ich Folgendes tun:

[useragent = *iPad*] && [globalVar = GP:L = 3] || [useragent = *iPhone*] && [globalVar = GP:L = 3]
page.10.subparts.FLASHLESS >
page.10.subparts.FLASHLESS = FILE
page.10.subparts.FLASHLESS.file = fileadmin/non_flash_am.txt


[useragent = *iPad*] && [globalVar = GP:L = 0] || [useragent = *iPhone*] && [globalVar = GP:L = 0]
page.10.subparts.FLASHLESS >
page.10.subparts.FLASHLESS = FILE
page.10.subparts.FLASHLESS.file = fileadmin/non_flash.txt

[global]

Das funktioniert, sobald die Standsprache explizit als Parameter auftaucht. Was sie aber auf der Startseite nicht tut sondern erst nach dem Sprachwechsel.

Verwende ich allerdings

[useragent = *iPhone*] || [useragent = *iPad*]
page.10.subparts.FLASHLESS >
page.10.subparts.FLASHLESS = FILE
page.10.subparts.FLASHLESS.file = fileadmin/non_flash_am.txt

[useragent = *iPad*] && [globalVar = GP:L = 0] || [useragent = *iPhone*] && [globalVar = GP:L = 0]
page.10.subparts.FLASHLESS >
page.10.subparts.FLASHLESS = FILE
page.10.subparts.FLASHLESS.file = fileadmin/non_flash.txt

[global]

Setzt mir mein System die Standsprachenlösung auf allen Sprachen ein.

Vorschläge, Ideen, Lösungen?

Herzlichen Dank!

Wiebke