de vs de_AT vs de_CH de_DE
Posted: Wed Apr 09, 2008 7:53 pm
I'm building a site with English and German content. I've setup the database for en and de and the config_lang.php for en_US and de_DE. My default language is en_US.
In my page template I'm using {lang} to allow language switching.
Everything is working fine as long as the browser sends either en_US or de_DE as HTTP_ACCEPT_LANGUAGE header. As soon as a browser sends de_AT, de_CH or simply de then the DEFAULT_LANG content (that is en_US) is shown.
Is there a possibility to map all the de languages to the de content (and all the en languages to the en content)?
I can add additionaly hls entries but this will duplicate the language choices in my {lang} list and I don't like this...
Kriz
In my page template I'm using {lang} to allow language switching.
Code: Select all
define('DEFAULT_LANG', 'en_US');
$force_mle_default = false;
$hls = array(
'en_US' => array(
'block'=>'en',
'flag'=>'<img src="images/lang/en_US.png" style="border:0" alt="English" />',
'text'=>'English',
),
'de_DE' => array(
'block'=>'de',
'parent' => 'de',
'flag'=>'<img src="images/lang/de_DE.png" style="border:0" alt="Deutsch" />',
'text'=>'Deutsch',
),
);
Is there a possibility to map all the de languages to the de content (and all the en languages to the en content)?
I can add additionaly hls entries but this will duplicate the language choices in my {lang} list and I don't like this...
Kriz