Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 36: Localizing Flex Applications > Creating resources - Pg. 1080

ADOBE FLEX 3 1107 Adobe Flex 3 Developer Guide · 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" on page 1047. Creating resources You define localization resources in properties files. These properties files contain key/value pairs and are in UTF- 8 format. You typically use these properties files to specify the values of Strings in your applications, such as the label on a button or the items in a drop down list. The following example specifies the values for a form's labels in English: # locale/en_US/RegistrationForm.properties registration_title=Registration