Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7793455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:29:36+00:00 2026-06-01T22:29:36+00:00

I am trying to make this decision on what content (Messages) to be displayed

  • 0

I am trying to make this decision on what content (Messages) to be displayed based on the useragent. Everything works correctly when I user query param, or a meta tag. it also works correctly in Firefox. In firefox I change the language from english to french, reload the page and everything comes up correctly. This is baed on the useragent. If I load the page in chrome/IE I get the default (English) only. If I set my system language to French (my other language) everything seems to work as well. Any ideas why setting the language in chrome and IE have no affect no the content? I verified the headers and the requests are being made for French content? What am I missing?

My gwt.xml file is based on the one I found here http://code.google.com/p/google-web-toolkit/source/browse/releases/2.3/user/src/com/google/gwt/i18n/I18N.gwt.xml

It was my understanding that all I needed to add was the following to my gwt.xml
set-configuration-property name=”locale.useragent” value=”Y”

Also I found the following Why does GWT ignore browser locale? which seems to indicate it won’t work in IE but what about chrome?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:29:38+00:00Added an answer on June 1, 2026 at 10:29 pm

    See http://code.google.com/p/google-web-toolkit/issues/detail?id=4228

    TL;DR: there’s no reliable way of getting the info you’re looking at in JavaScript, the navigator object gives you the locale of the browser (i.e. the one used for the browser’s own menus et al.), not the user’s language preferences (except in Firefox).
    Your best bet is to use a dynamic host page and generate the appropriate <meta> on the server depending on the request headers (i.e. content negotiation).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make this request to the RunKeeper API : GET /user HTTP/1.1
Im trying to make this layout look better. Everything was find until I added
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I am trying to make this sample program work (defn foo ([x] (foo x
I'm trying to make this: 174,myfilename.jpg Into this on the php post process page:
I'm trying to make this regex ^(?!\-\-\sRoaming) to match with -- Roaming but it
I've been trying to make this script from ClearBox3 to stop conflicting with MooTools
I am trying to make this button using CSS3: But my button looks like
I am trying to make this landscape only iphone app. I only use this
I'm trying to make this fragment work: Version History --------------- These are the versions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.