Posts tagged "localization"

How to create a localized DateChooser in your Flex app

This article was originally written in English. Text in other languages was provided by machine translation.

 

Xie Fang

By default the DateChooser in Flex shows the English UI. You need to set the dayNames and monthNames properties to localized strings so that it shows the language you want. But do you know that all these localized names are available in the flash.globalization package? Here’s how to get the localized names.

First, create a DateTimeFormatter object with the locale you are interested in the <fx:Script> section

Alternatively, if you feel more comfortable with MXML than ActionScript, you can use a MXML DateTimeFormatter in the <fx:Declarations> section.

Second, create a vectorToArray function for type conversion in the <fx:Script> section, we will explain a little more in the next step.

Third, in your <mx:DateChooser> component, set the dayNames and monthNames properties.


And since you are using the DateTimeNameStyle enums, you want to import them in <fx:Script>

Here, the getWeekdayNames and getMonthNames methods give the localized names as a vector of string. And vectorToArray function is used to convert them to array before assigning them to the DateChooser. The getFirstWeekday method gives the first day of the week for the locale. For example, many european locales use Monday as the first day instead of Sunday.

That’s it. Now run your app and you will see the DateChooser UI is showing in Chinese.

Change the locale to British English (en-GB) and Arabic, Saudi Arabia (ar-SA) to see how the locale changes the first day of week.

Think that this doesn’t save time than hardcoding? Such as:

It is true if you just need to localized to your language. But imagine you need to localize in multiple languages, or languages you don’t know, or you want language switchable by users at run time. Using flash.globalization is more scalable.

To learn more features provided by flash.globalization package, check out the ActionScript API documentation.

Is It Important to Localize Developer Tools?

This article was originally written in English. Text in other languages was provided by machine translation.

 

Do you create multilingual content or apps using Flash Builder? Do you use a localized version of Builder? Why or why not? Do you prefer to develop in English while deploying in multiple languages?

We would like to hear your voice and understand your pain points. Please link to our short survey on Flex and localization so we can understand what is important to you.
Many thanks!
Janice Campbell, Flex Localization

The Adobe Globalization Blog

This article was originally written in English.

 

Today we are launching Adobe’s first ever globalization blog. Adobe believes that everyone in the world should be able to express and exchange ideas in the language they prefer, and thus we have a strong interest in ensuring that our global customers are able to create applications, content and systems that satisfy the requirements of every geographical market.

Through this blog, we intend to provide our users with information that will enable them to achieve that. In addition, we will inform readers about new globalization-relevant product features, tools and libraries.

Also, we hope to hear from you! Have you found a globalization or localization bug? Do you have a globalization-related request for one of our products? Wrote some globalization guidelines that you want to share with the world? Here’s the place to share your feedback.

Enjoy
The Adobe Globalization Team