Global Formatting Policy

Global Formatting Policy

book

Article ID: KB0071883

calendar_today

Updated On:

Products Versions
TIBCO EBX All versions

Description

Declaring global formatting policy:
If you have various language packs and facing issues with formatting reflection with specified language. If the formatting is reflected with one language pack and not with another you can follow the below steps to set the formatting policy.

Issue/Introduction

How to set the Global formatting policy rather than specifying it as the module specific or language specific .

Resolution

1. Build a jar that respects the following tree: com/orchestranetworks/i18n/frontEndFormattingPolicy_xx.xml (example with English: frontEndFormattingPolicy_en.xml)
2. Deploy the jar in the exact location as ebx.jar
Below is a sample of the formatting policy which needs to be declared in frontEndFormattingPolicy_en.xml :-

-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<formattingPolicy xsi:schemaLocation="urn:ebx-schemas:formattingPolicy_1.0 ../schema/ebx-reserved/formattingPolicy_1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ebx-schemas:formattingPolicy_1.0">
<date pattern="MM/dd/yyyy"/>
<time pattern="HH:mm:ss"/>
<dateTime pattern="MM/dd/yyyy HH:mm"/>
<decimal pattern="00,00,00.000" decimalSeparator="^" groupingSeparator="|"/>
<int pattern="0" groupingSeparator=""/>  

</formattingPolicy>
-------------------------------------------------------

The changes are to be done in the above format as per the requirement. For example, if you want an integer value to be visible in the format as:

1----> 000001

2----> 000002

-----------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

-<formattingPolicy xsi:schemaLocation="urn:ebx-schemas:formattingPolicy_1.0 ../schema/ebx-reserved/formattingPolicy_1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ebx-schemas:formattingPolicy_1.0">

<date pattern="MM/dd/yyyy"/>    // change in date pattern eg .”dd/MM/yyyy”
<time pattern="HH:mm:ss"/>
<dateTime pattern="MM/dd/yyyy HH:mm"/> 
<decimal pattern="00,00,00.000" decimalSeparator="^" groupingSeparator="|"/>
<int pattern="0" groupingSeparator=""/>    //change in the format of int pattern eg.”000000”

</formattingPolicy>
-----------------------------------------------------------------------------------------

Default format:-

After the format change:-
<int pattern="000000" groupingSeparator=""/>



-------------------------------------------------------------------------------------------

In a similar way change in format for the date pattern will reflect the date pattern change on UI
<date pattern="MM/dd/yyyy"/>  - - - -> <date pattern="dd/MM/yyyy"/>

Additional Information

https://docs.tibco.com/pub/ebx/6.0.8/doc/html/en/references/i18n_extended.html
https://docs.tibco.com/pub/ebx/6.0.8/doc/html/en/references/i18n.html#formattingPolicies

Attachments

Global Formatting Policy get_app