First page Back Continue Last page Text

oracle adf workshop

Notes:


Internationalizing the Data Model

Many of the declarative modifications that you make to the data model involve text, such as labels or messages. ADF makes it easy to translate such text by offering the option to store it in resource bundles. You can use one resource bundle for the entire project or a separate one for each file.

Resource bundles are properties files containing translatable strings stored with key values and optionally with descriptions that are stored as comments. For example, the label for the OrderDate field of the Orders entity object is stored as:

#Used for the label of Orders.OrderDate

ORDER_DATE=Order Date

where ORDER_DATE is the key, Order Date is the translatable string, and the first line is the description. Although the description suggests the usage, the string can be used anywhere.

To provide multiple languages, a translator needs to only copy the properties file and append to the name _<locale>. For example, the properties file depicted in the slide may have a German translation; the name of that file would be Project1Bundle_de.properties. All the translations should be stored in the same directory.

When you configure the user interface to support multiple translations as explained in the lesson titled “Planning the User Interface,” then the correct translation is used depending on the client’s browser settings.