title: Detecting browser locales/languages and generating output
body: <p>We have a Java app that renders Localized text on user’s browser session based upon browser language settings. The app reads the browser language settings [set within the header that comes as in request to app] and prepares the localized text. 
  But recently we faced issues for Mozilla 5.0 version browser. Note our code works fine in IE. Taking an example for 'ja' language we are expecting browser to send accepted language as 'ja-JP' [which IE does]  - but unfortunately Mozilla (FF) does not - it only sends browser accepted language as 'ja'. So we land up in generating content using default language. <br>
  <br>
  Since we are providing a fix for same - basically something like map [language code to language-Country code] like - 'ja' to 'ja-JP' and then create a new locale [only if 2 digits language code is present after in request] - my question is for other browsers like <br>
  Chrome <br>
  Safari <br>
  etc <br>
  What are the language formats send within headers? <br>
  So having a array say like this <br>
  ja-JP = ja-JP <br>
  ja = ja-JP <br>
  and mapping the browser language to language-country code  would help to resolve the issue.  But is there any specific constraint that we need to address – say are there languages that are spoken in multiple locations - if so then how would we deal with it?<br>
  Any other thing that we need to pay attention to?<br>
  Thanks in advance.</p>