I want to execute the following javascript functions in a model or in a controller, and work with result . navigator.systemLanguage navigator.userLanguage
how can i do?
I want to execute the following javascript functions in a model or in a controller, and work with result . navigator.systemLanguage navigator.userLanguage
how can i do?
and? ajax is asynchronous so i can you code i've taken from client in my server side
Jean-Sébastien wrote:
I want to execute the following javascript functions in a model or in a controller, and work with result . navigator.systemLanguage navigator.userLanguage
Add this to an action:
raise request.env.inspect
That shows the HTTP headers. One of them should specify the language.
thanks philips, i knew it, it is request.env["HTTP_ACCEPT_LANGUAGE"], but those javascript functions give me navigator language and os language. anyway i think you're right i will use this method.