O'Reilly logo

Flash® Builder™ 4 and Flex® 4 Bible by David Gassner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 30. Localizing Flex 4 Applications

IN THIS CHAPTER

  • Understanding Flex application localization

  • Understanding locales

  • Defining resource bundles at runtime

  • Binding text controls to stringbased localization properties

  • Defining external resource bundle files

  • Setting Flex project compiler arguments for localization

  • Embedding graphics in external resource bundle files

When you localize an application, you create a pattern that enables you to easily publish and run an application in multiple languages. The Flex 4 SDK includes a number of tools that support localization, including compiler tools that support selecting a locale at compilation time or runtime, and resource bundles that represent strings, images, and other resources used in specific locales.

Using these tools, you can create an application that's localized either during compilation or while the application is running. The localization architecture works the same with both MX and Spark components, and with both Web applications and desktop applications deployed with Adobe AIR.

In this chapter, I describe how to develop resource bundles for localized applications and how to select locales for a compiled application and at runtime.

Note

To use the sample code for this chapter, download chapter30.zip from the Web site. This is not a Flex project archive file. Its use and installation are described later in this chapter.

Using Locales to Select Application Resources

A locale is a way of designating a specific set of strings, images, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required