Reputation: 1
How to set the format of currency from US format to Indian format in Oracle Adf?
Upvotes: 0
Views: 2018
Reputation: 2414
you can change the locale of the session to indian locale.
This happens automatically when you add ithe indian locale (Example uses german, czech and english, so adjust accordingly ) to your set of supported locales inside the faces-config.xml:
<application>
<default-render-kit-id>oracle.adf.core</default-render-kit-id>
<message-bundle>de.xxx.resources</message-bundle>
<locale-config>
<default-locale>de</default-locale>
<supported-locale>de</supported-locale>
<supported-locale>en</supported-locale>
<supported-locale>cs</supported-locale>
</locale-config>
</application>
When the server detects any of the supported locales to be available in the browser (The Browser sends an Accept-Language HTTP header according to the languages configured by the user) it switches the locale of the session to that locale, this will the apply to currency, number and date formats. Instead of configuring them explicity, they change according to the session locale. You can then set the default locale to indian too, this default locale will then be used for sessions where either the browser does not send any Accept-Language header at all or the languages of the browser and the supported locales of the app have no common elements.
For mor Details on Localizing App in ADF see ADF Dev Guide
Upvotes: 1