Automatically detect client's locale setting


#1

Hi,

Does I18n provide any easy feature to detect the client’s browser
locale?


#2

Hi Fernando,

had the same problem, but solving was quite easy:

I18n.locale =
request.headers[‘HTTP_ACCEPT_LANGUAGE’].split(’,’)[0].split(’-’)[0]

greetings
Christian

Fernando P. wrote:

Hi,

Does I18n provide any easy feature to detect the client’s browser
locale?