Making a CMsimple multilanguage site is great!!!
But I desperately need a "automated" redirect to "browserlanguage" or "country" so english visitors don't go first to the "default dutch page" and click away before finding a "small flag in the corner"...
Anyone knows how to get this done?
Please, any help is verrrrrry welcome!
Language redirect
Re: Language redirect
there is not such a plugin
but you can try to do something with a .htaccess which redirects to the relevant language
good luck,
Connie
but you can try to do something with a .htaccess which redirects to the relevant language
good luck,
Connie
|---
Connie Müller-Gödecke, http://www.webdeerns.de
Connie Müller-Gödecke, http://www.webdeerns.de
Re: Language redirect
Should be easy done by JavaScript, too.
It's a nice idea.
I'm thinking about writing a little plugin on that...
Holger
... but remember maybe the language, returned from the Browser, must not be the language the user prefers to read.
So redirection should only done with the first visit.
It's a nice idea.
I'm thinking about writing a little plugin on that...
Holger
... but remember maybe the language, returned from the Browser, must not be the language the user prefers to read.
So redirection should only done with the first visit.
Re: Language redirect
make a new index.php (and rename the old to index2.php) a let visitors choose there language on index.php???
Re: Language redirect
To be placed in top of template:
Code: Select all
$uc = substr(@$_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if($uc==""||$uc=="dk")$uc="da";
if($uc=='da'&&$sl!='da'){header("Location: http://www.domain.dk/da/");exit;}
if($uc=='de'&&$sl!='de'){header("Location: http://www.domain.dk/de/");exit;}
Re: Language redirect
That's IMHO a bad idea.harteg wrote:To be placed in top of template:
Code: Select all
$uc = substr(@$_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); if($uc==""||$uc=="dk")$uc="da"; if($uc=='da'&&$sl!='da'){header("Location: http://www.domain.dk/da/");exit;} if($uc=='de'&&$sl!='de'){header("Location: http://www.domain.dk/de/");exit;}
An empty $uc should do nothing. So the visitor will see the pages with the default language.
And what about looking on a page in german language when your browser language is set to "dk"?
There's no chance to see the page http://www.domain.dk/da/?Very_interesting_page with a german browser.
Automatic redirection should only done on the first page request and only if the main domain was requested.
Holger