0
Detect language used by browser

/t5/dreamweaver-discussions/detect-language-used-by-browser/td-p/969207
Mar 28, 2008
Mar 28, 2008
Copy link to clipboard
Copied

Hi,
Back after a long time, I have a new problem:
the html page I made last year, whith an integrated Flash module works well.
But now, I would like to detect automatically in the Html code the browser language page code in order to open or the default flash module (french) or if the browser is not in french, by default my english flash animation.
I don't no how to make this in html. Can you please help me ?
thanks in advance for your precious help.
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/detect-language-used-by-browser/m-p/969208#M137882
Mar 29, 2008
Mar 29, 2008
Copy link to clipboard
Copied
.oO(alien_6390)
> Back after a long time, I have a new problem:
> the html page I made last year, whith an integrated Flash module works well.
> But now, I would like to detect automatically in the Html code the browser
>language page code in order to open or the default flash module (french) or if
>the browser is not in french, by default my english flash animation.
> I don't no how to make this in html. Can you please help me ?
> thanks in advance for your precious help.
You can't do that in HTML. You need some server-side scripting to check
and parse the HTTP Accept-Language header, which is sent by the browser.
On an Apache server a feature called "content negotiation" might be
another option to let the server decide automatically which language
variant of a page to return.
Micha
> Back after a long time, I have a new problem:
> the html page I made last year, whith an integrated Flash module works well.
> But now, I would like to detect automatically in the Html code the browser
>language page code in order to open or the default flash module (french) or if
>the browser is not in french, by default my english flash animation.
> I don't no how to make this in html. Can you please help me ?
> thanks in advance for your precious help.
You can't do that in HTML. You need some server-side scripting to check
and parse the HTTP Accept-Language header, which is sent by the browser.
On an Apache server a feature called "content negotiation" might be
another option to let the server decide automatically which language
variant of a page to return.
Micha
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/dreamweaver-discussions/detect-language-used-by-browser/m-p/969209#M137883
Mar 29, 2008
Mar 29, 2008
Copy link to clipboard
Copied
Ok, thanks for your answer, but I don't need to install and
configure a server I think. It seems to me that it is possible with
a Java script. Did you know something about that?
Thanks again.
Thanks again.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/detect-language-used-by-browser/m-p/969210#M137884
Mar 31, 2008
Mar 31, 2008
Copy link to clipboard
Copied
.oO(alien_6390)
>Ok, thanks for your answer, but I don't need to install and configure a
>server I think.
I think you think wrong.
>It seems to me that it is possible with a Java script. Did you know
>something about that?
No, and I wouldn't do it this way because it's completely unreliable.
JavaScript is always just optional, reliable solutions are done on the
server. I don't even know if and how this could be done with JS at all.
Micha
>Ok, thanks for your answer, but I don't need to install and configure a
>server I think.
I think you think wrong.
>It seems to me that it is possible with a Java script. Did you know
>something about that?
No, and I wouldn't do it this way because it's completely unreliable.
JavaScript is always just optional, reliable solutions are done on the
server. I don't even know if and how this could be done with JS at all.
Micha
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/detect-language-used-by-browser/m-p/969211#M137885
Mar 31, 2008
Mar 31, 2008
Copy link to clipboard
Copied
Michael Fesser wrote:
> .oO(alien_6390)
>
>> Ok, thanks for your answer, but I don't need to install and configure a
>> server I think.
>
> I think you think wrong.
>
>> It seems to me that it is possible with a Java script. Did you know
>> something about that?
>
> No, and I wouldn't do it this way because it's completely unreliable.
> JavaScript is always just optional, reliable solutions are done on the
> server. I don't even know if and how this could be done with JS at all.
>
> Micha
navigator.language // "en","de" etc
navigator.userLanguage (IE)
Mick
> .oO(alien_6390)
>
>> Ok, thanks for your answer, but I don't need to install and configure a
>> server I think.
>
> I think you think wrong.
>
>> It seems to me that it is possible with a Java script. Did you know
>> something about that?
>
> No, and I wouldn't do it this way because it's completely unreliable.
> JavaScript is always just optional, reliable solutions are done on the
> server. I don't even know if and how this could be done with JS at all.
>
> Micha
navigator.language // "en","de" etc
navigator.userLanguage (IE)
Mick
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

