0 Replies Latest reply on Jul 15, 2010 5:34 AM by pradeep reddy

    LOCALIZING FLEX APP - Accept-Language header

    pradeep reddy Level 1


      According to liveDocs (http://livedocs.adobe.com/flex/3/html/help.html?content=l10n_1.html) we can choose the locale in either of the below mentioned ways.


      Choosing a locale

      To determine which locale your users will want to experience your  application in, you can use one of the following methods:

      • User prompt -- You can start the application in some default  locale, and then ask the user to choose their preferred locale.
      • Capabilities.language -- The Capabilities.language property in ActionScript  provides the language code for Adobe® Flash® Player and Adobe AIR™. On  English systems, this property returns only the language code, not the  country code. This property returns the user interface language, which  refers to the language used for all menus, dialog boxes, error messages,  and help files in Flash Player and AIR.
      • Accept-Language header -- When a  browser makes an HTTP request, it send a list of languages to the server  in the Accept-Language header. You can  parse this header in your HTML wrapper and pass it as a flashVars variable into your Flex application. If  you use URLLoader to load an application, you will not have access to  this header.

      • Browser and OS language settings -- You can access the browser's  or operating system's language settings in the HTML wrapper by using  JavaScript. You can then pass the values as flashVars variables to your application. You can also use the ExternalInterface  API to access the values from within your Flex application. The language  is typically accessible via the Navigator object's language property. Depending on the browser, you also access the userLanguage or systemLanguage properties. For more information on using the ExternalInterface API,  see Using  the ExternalInterface API to access JavaScript from Flex.


      I want to follow the third approach.. But my problem is: I am not able to access the HEADERS

      any help will be greatly appreciated..!