Internationalizing a Cloned Workapp Application

Applications that have been cloned from the Workapp sample application can be internationalized using the procedure provided here.

Procedure

  1. Select your custom (cloned) application in the Application Development user interface, then click Open.
  2. Open the main controller file, MyWorkCtrl.js.
  3. Locate the following comments and code, then uncomment the last three lines.
    // NOTE: After cloning the app, if you want to use your own L10N bundle,
    // uncomment the following code and pass the right app name
    // app.run(['BPMTranslationServiceConfig', function(BPMTranslationServiceConfig) {
    // 	BPMTranslationServiceConfig.registerApp("MyApp_name_here", null);
    // }]);
  4. Add a call to unregister the sample Workapp application.
    The sample Workapp application is registered by default. Unregistering it prevent bundles from being loaded from the Workapp application. The code should now look like this:
    // NOTE: After cloning the app, if you want to use your own L10N bundle,
    // uncomment the following code and pass the right app name
    app.run(['BPMTranslationServiceConfig', function(BPMTranslationServiceConfig) {
    BPMTranslationServiceConfig.unregisterApp("workapp");
    BPMTranslationServiceConfig.registerApp("MyApp_name_here", null);
    }]);
  5. In the code you uncommented in Step 3, change "MyApp_name_here" to the name of your custom application as deployed in Application Development. For example:
    // NOTE: After cloning the app, if you want to use your own L10N bundle,
    // uncomment the following code and pass the right app name
    app.run(['BPMTranslationServiceConfig', function(BPMTranslationServiceConfig) {
    BPMTranslationServiceConfig.registerApp("MyCustomApp", null);
    }]);
  6. Save the changes to the MyWorkCtrl.js file.

Result

Now when your application is run, the available locales will be listed in the languages field in the upper-right part of the application (provided you have localized the application by adding the language packs).

For information about editing phrases for an available locale, or adding a new language pack, see the "Localizing Applications" topic in the TIBCO ActiveMatrix® BPM Client Application Management Guide.