How to customize default messages in TIBCO EBX

How to customize default messages in TIBCO EBX

book

Article ID: KB0074542

calendar_today

Updated On:

Products Versions
TIBCO EBX All supported versions.

Description

In this article we will explain how to customize the default EBX messages, by creating a new locale.

Issue/Introduction

How to customize default EBX messages

Resolution

Documentation

In order to add a new locale, the following steps must be followed:

  • Declare the new locale in the EBX™ main configuration file.

For example: ebx.locales.available=en-US, fr-FR, xx
See Configuring EBX™ localization.

•  The first locale is always considered the default.
•  The built-in locales, en-US and fr-FR, can be removed if required.
  • Deploy the following files in the EBX™ class-path:

•  A formatting policy file, named com.orchestranetworks.i18n.frontEndFormattingPolicy_xx.xml,
•  A set of localized message files (*_xx.mxml) in a resource bundle.

Note: The files must be ending with ".mxml".

A complete template set of files is available here.

Example

I want to create a new locale: en-ZA that will extend the default english locale and modify the default primary key message: "The requested operation has failed. Reason: Cannot create the new record since its primary key is already used."

It is located in addErrorCannotCreateSincePrimaryKeyUsed in uowPrinter_xx.mxml.

The files I will use and modify are:

  • frontEndFormattingPolicy_xx.xml
  • uowPrinter_xx.mxml

I then have to deploy the files as a JAR, alongside ebx.jar, respecting the following tree:

User-added image

My locale with its custom message is now created.

Additional Information

Documentation: https://docs.tibco.com/pub/ebx/5.9.12/doc/html/en/references/i18n_extended.html#id2
Template set of files: docs.tibco.com/pub/ebx/5.9.12/doc/html/en/resources/i18n/i18n_xx.zip