How to force ADF to speak your language (or any common language)
Posted
by Blueberry Coder
on Oracle Blogs
See other posts from Oracle Blogs
or by Blueberry Coder
Published on Fri, 14 Dec 2012 02:05:56 +0000
Indexed on
2012/12/14
5:11 UTC
Read the original article
Hit count: 217
/ADF
When I started working for Oracle, one of the first tasks I was given was to contribute some content to a great ADF course Frank and Chris are building. Among other things, they asked me to work on a module about Internationalization. While doing research work, I unearthed a little gem I had overlooked all those years.
JDeveloper, as you may know, speaks your language - as long as your language is English, that is. Oracle ADF, on the other hand, is a citizen of the world. It is available in more than 25 different languages. But while this is a wonderful feature for end users, it is rather cumbersome for developers. Why is that? Have you ever tried to search the OTN forums for a solution with a non-English error message as your query? I have, once. But how can you force ADF to use English for its logging operations? Playing with your system settings will not help, unfortunately.
By default, ADF will output its error messages in the selected locale for the operating system account the application server runs on. The only way to change this behavior is to pass initialization parameters to the JVM used by the application server. It is even possible to specify the language and country/region separately. In the example below, we choose English and the United States respectively.
-Duser.language=en -Duser.country=US
In the case of WebLogic Server, it is possible to add such parameters in setDomainEnv.sh (or .cmd) to apply the settings to all the managed servers present on a node.
In the coming weeks, I will write a few posts about other internationalization issues. Is there anything you would like me to cover? Let me know in the comments.
© Oracle Blogs or respective owner