recently added $.global and grabbing the culture from @Request.UserLanguages[0] in my view. this works in Firefox on my localhost (to get en-GB) but when i point to appHarbor this does not work...
could this be related to load-balancing of requests? How do I get the correct language from the client?
fyi, it also does not work on iphone.
#1 Posted by fcuk112 on 08 Apr, 2011 02:12 PM
interestingly enough I do get correct culture in chrome and IE9...
#2 Posted by friism Support staff on 08 Apr, 2011 05:51 PM
I've created a simple test-app that outputs the
UserLanguagesarray as a list: http://localetest.apphb.com/It seems to output relevant strings using both Firefox and Chrome. How are the wrong languages manifested when you use Firefox?
#3 Posted by fcuk112 on 08 Apr, 2011 05:57 PM
output in chrome (latest non-dev build):
en-GB
en-US;q=0.8
en;q=0.6
output in firefox v4:
en-us
en;q=0.5
output in IE9:
en-GB
very strange...
#4 Posted by fcuk112 on 08 Apr, 2011 06:02 PM
ugh, now it seems i am getting the wrong culture in my localhost as well with FF (am sure it was returning en-GB before though...).
i will try to dig into a bit further - thanks for looking into this.
#5 Posted by friism Support staff on 08 Apr, 2011 06:09 PM
You should check your browser language settings, that dictates what is sent in the
Accept-LanguageHTTP header. There's a good explanation in the answers to [this question(http://stackoverflow.com/questions/1043339/javascript-for-detecting...)].friism closed this discussion on 08 Apr, 2011 06:09 PM.