JDeveloper is built for enterprise applications, so it automatically prepares your application for localization. Let's take the XDM Common Model as an example:
Now watch what happens when we go into the Task entity object and define a Control Hints for an attribute:
Because the PersId
is something that might be shown to the application end user—for example as a prompt for a drop-down list—JDeveloper does not just hardwire the literal string into the application. Instead, JDeveloper automatically creates a
Resource Bundle for you. You can see this new file in the Application Navigator:
Notice the new file CommonModelBundle.properties. If you open this file, you'll see something like this:
Extracted the value you defined as the label control hint for the attribute
Created a Resource Bundle file
Placed the text you entered into the Resource Bundle and assigned a key to it
Inserted a reference to the resource key into the entity object
If you click the Source tab for the entity object, you can see that the ResId attribute for the label points to com.dmcsol.xdm.model.entity.Task.PersId_LABEL—the key that JDeveloper automatically created in the resource bundle: