Localization Support with Message Bundles

In earlier chapters, we looked at the XML elements that make up the core of an OpenSocial gadget. This is where the concept of localization in gadgets was first introduced. Expanding upon this topic, we’ll reiterate the importance of localization in targeting a worldwide audience, and discuss how to build localization support for multiple languages into your gadgets.

As anyone who has developed frontend systems to be implemented across multiple countries undoubtedly knows, porting a system between languages when it was not developed to handle multiple languages can require major style, formatting, and content revisions. This is especially true when you’re working with English character sets and moving to 8-bit.

If you don’t intend for your application to ever grow beyond your country of origin, localization support is probably not high on your list of important tasks. Really think about this for a moment—if your application, which currently uses US English, suddenly finds a huge audience in China, will you turn away the additional traffic and monetization potential, or will you work overtime to support that audience’s needs?

When taken into consideration before construction of a new application begins, localization doesn’t have to be a challenging, time-consuming effort. This is where message bundle definitions come into play. By providing a means through which developers can define support for sentence structures in multiple languages, message ...

Get Programming Social Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.