Sunday, October 23, 2011

AIA Localization of Title and Error message

Localization of Title and Error message according to the different geographical location is one of the key requirements for customer. Here I’m showing one example on how to localize in German language. AIA provides the Error code, Error Message and Title message in a java class file. It also depends on the PIP we are using. In this example I have taken communication PIP for localization. Localization call is made from bpel or xsl using xpath function getAIALocalizedString(). The xpath function in turn refers the class file to get the localized string.

All the communication PIP error codes and messages are stored in ‘AIAListResourceBundle’ class file. Filename of this resource bundle is configurable and its property is available in AIAConfigurationProperties.xml file.

<ModuleConfiguration moduleName="ResourceBundle">
<Property name="Telco/BillingManagement">oracle.apps.aia.core.i18n.AIAListResourceBundle</Property>
<Property name="Telco/ProductLifeCycle">oracle.apps.aia.core.i18n.AIAListResourceBundle</Property>
<Property name="Telco/SalesOrder">oracle.apps.aia.core.i18n.AIAListResourceBundle</Property>
<Property name="Telco/CustomerParty">oracle.apps.aia.core.i18n.AIAListResourceBundle</Property>
</ModuleConfiguration>


To implement localization you need to decompile the java file ‘AIAListResourceBundle.class’at the location $ORACLE_HOME/ bpel/system/classes/oracle/apps/aia/core/i18n. Save the decompiled file as ‘AIAListResourceBundleGerman.java’. Find and replace the word ‘AIAListResourceBundle’ with ‘AIAListResourceBundleGerman’. The java file will have all the error codes and details as shown in below sample.

"AIA_ERR_AIACOMOMPI_0001", "Purchase date on Order {0}, Line {1} for Product {2} needs to be set to the future, for Billing Initiation"

Comment above line and provide equivalent German translated word as shown below.

"AIA_ERR_AIACOMOMPI_0001", " Kaufdatum auf Auftrag {0}, Line {1} für Produkt {2} muss auf die Zukunft eingestellt werden, für Billing Initiation "

Similarly do translation for all the error codes and compile the ‘AIAListResourceBundleGerman.java’ file. Copy the compiled class file ‘AIAListResourceBundleGerman.class’ to $ORACLE_HOME/ bpel/system/classes/oracle/apps/aia/core/i18n folder. Also need to edit the AIAConfigurationProperties.xml to update the new class file as shown in below example.

<property name="Telco/BillingManagement">oracle.apps.aia.core.i18n.AIAListResourceBundleGerman</property>

Restart the server to make effect of all the changes. Now all your title and error messages will be shown in German language.

Similarly error codes for other PIPS are provided in ‘EHResourceBundle.class’ at location $ORACLE_HOME/bpel/system/classes/oracle/apps/aia/core/eh/i18n. Follow similar steps as mentioned above to localize it.




No comments:

Post a Comment