Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

localisation

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. interestingly enough I do get correct culture in chrome and IE9...

  2. I've created a simple test-app that outputs the UserLanguages array 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. 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. 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. You should check your browser language settings, that dictates what is sent in the Accept-Language HTTP header. There's a good explanation in the answers to [this question(http://stackoverflow.com/questions/1043339/javascript-for-detecting...)].

  6. friism closed this discussion on 08 Apr, 2011 06:09 PM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac