How To : Localizing and Internationalizing Applications

Page Status: Beta

Back to Concepts and HOW TOs

Contents

[edit] Description

Bungee provides no formal support for localization or internationalization. However, this document shows how this functionality can be simulated within your application using existing methods and APIs.

[edit] Prerequisites

Understanding Forms
DynamicForm control
FormList control

[edit] Procedure

  1. Create a parent class (for example, i18nClass) that contains a dummy instance of each resource (forms, strings, etc.) to be localized.
  2. Create a stub for each resource you wish to localize within the "i18nClass" class (for example, i18nClass.formAddress).
  3. Create a subclass for each localization you wish to support (for example, i18nClass_us, i18nClass_ca, etc).
  4. Within each localized subclass, override the resources that you wish to localize.
  5. Create a factory class with a single method (for example, i18nFactory.getClass).
    • The prototype should return an instance of the parent localization class (for example, i18nClass).
    • The factory method should return an instance of the subclass based on the user's specific localization.
  6. Using the factory class, retrieve an instance to the specific localization you wish to use.
  7. Reference this instance within a dynamic form (or dynamic form list) to correctly show the localized version.

[edit] Error Handling

 

[edit] Examples

 

[edit] Next Steps

 

[edit] Tags


 


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.