Hey Gang, Let’s Localize the Flex Framework Resource Bundles

When I migrated from C# to Flex/AIR in order to develop YNAB 3, I was met with a few surprises. One of them was that the default Flex Resource Bundles were not localized. Oh sure, they include Japanese, but not FIGS (French, Italian, German, Spanish). This means, from what I’ve been able to find, that if you want to display currencies and dates in the user’s default language, you’re stuck translating them yourself.

When we wrote YNAB Pro in C#, one of the things we got for FREE was default currency and date/time formats. I just told YNAB Pro to display money and time in the appropriate format that Windows defined, and I immediately had a partially localized application.

When I first ran into this, I assumed that surely other people had already solved this problem and posted standard .properties files somewhere, but my Google-Foo has turned up nothing. So now, I want to be that guy. Within the next few weeks, I’d like to have an open source project hosted somewhere (Google Code most likely) that will offer localized versions of the following files for every language:

SharedResources.properties
controls.properties
formatters.properties
validators.properties

How will I do this? Well, first, I’m only going to localize the parts of those files that are related to date/time/numbers/currency. In other words, the standard stuff. Secondly, I’m going to automate it. I’ll write a C# program that loops through the available cultures and spits out the appropriate values for things like decimal separators and currency symbols into the appropriate files.

You’ll be able to log on, grab these partially-localized resource bundles, configure your build process, and you’ll be a lot further along in localizing your program.

So, before I begin, I wanted to ask:

  1. Has someone already done this?
  2. Does anyone see any problems with my plan? Please let me know!
  3. Does anyone else think this sounds like fun and want to do it yourself? If you’re geek like me, the thought of automating the creation of so many useful files sounds like a tremendous amount of fun. Please feel free to run with this and be the hero for Flex/AIR developers everywhere. I’ll gladly trade glory for time. :)
  4. I assume I’ll have to license the files we generate under the MPL (like the Flex SDK) because this counts as a modification to existing framework files, right?

Tags: , , , ,

4 Responses to “Hey Gang, Let’s Localize the Flex Framework Resource Bundles”

  1. David Hamiter November 16, 2009 at 1:16 pm #

    I’m glad to see this happening. Localizing Flex apps is a tremendous pain. Anything effort in this arena is greatly appreciated.

  2. Logan November 16, 2009 at 1:53 pm #

    Flex 4 SDK is localized into a dozen or so languages. I haven’t figured out why Adobe just didn’t backport those into 3.x.

    However, someone else did get started:
    http://ttfx.org/Tontons_Flexeurs/BabelFlex.html

    Unfortunately they weren’t put in a source code repository, and many of them are wrong and haven’t been updated.

    Some of them have been fixed and put in the Flexmojos repository, for example the framework ones are here:
    http://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/framework/3.2.0.3958/

    It would be great to automate this process and get them more easily distributed.

  3. Wim Van Buynder November 16, 2009 at 3:08 pm #

    Hi,

    Maybe you should checkout this repository from Adobe opensource to get started ;)

    http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/bundles/

  4. admin November 16, 2009 at 3:18 pm #

    @David: Cool, thanks for the encouragement.

    @Logan: Woah, I didn’t see that in my searches! Nice! In the cases where we have the actual text already done for us, I think that using these will probably be the way to go.

    @Wim: Wow – didn’t know about that either! Nice! When I downloaded a test file, the encoding didn’t look to be correct, so I got strange characters. I presume that is an artifact of browsing the SVN that way instead of doing a true update from the repository?
    Example: http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/framework/bundles/es_ES/formatters.properties

    Between the Adobe opensource repository and FlexMojos, the common languages have been done, and that is great news!

Leave a Reply