1

Topic: select language by ip?

I thought the system switched automaticly by IP to the language, but apparently that doesn't work.
I have an htaccess for this, but can you asure me VLD does not have this function?

2

Re: select language by ip?

It does not. You may present users with a list of available languages for them to choose from.

Developer

3

Re: select language by ip?

This is not present in the current system.
The have this facility it would have to be coded manually., ie., get IP (we already have that) -> use IP to look-up country (function already present, reliability = ?, but there are others) -> present this countries language as the default.

4

Re: select language by ip?

Thx guys.
I've found this:
http://www.htaccesstools.com/redirection-by-language/

It redirects by htacces, example for dutch:

RewriteEngine on
RewriteCond %{HTTP:Accept-Language} (nl) [NC]
RewriteRule .* http://www.mysite.eu/index.php?language=dutch [R,L]

Last edited by godyn (2010-07-24 11:46:29)

5

Re: select language by ip?

It doesn't work :-/
It keeps refreshing, because the homepage is also in the maindirectory.

I've found this script:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.indexOf('en') > -1) document.location.href = 'http://www.site.eu/index.php?language=english';
else if (language.indexOf('de') > -1) document.location.href = 'http://www.site.eu/index.php?language=german';

else
document.location.href = 'http://www.site.eu/index.php?language=english';
// End -->
</script>
URL: http://able2know.org/topic/10004-1

But the problem still persists because of the index.php
So I created a index.html with this script.

Gotta test this out and I'll tell you the news...