Resource bundles are made up of 1 or more .properties files. Each file contains a key-value reference which is used to retrieve and display text in a given language. Properties files, defined to be of the same resource bundle, have the following naming structure:
A common prefix is used to associate files into a bundle.
The locale, for which this file is valid for, is used as a suffix.
A default properties file exists in order to support non-defined locales. This file does not have a (locale) suffix associated to its name. All files must be located in a directory which is in the classpath.
ApplicationResources.properties
msg.bienvenue.1=<B>Bienvenue dans l'application XYZ</B> msg.bienvenue.2=Heureux de vous servir en franais. boutton.login=Authentifier boutton.logout=Quitter
ApplicationResources_fr_CA.properties
msg.bienvenue.1=<B>Bienvenue dans l'application XYZ</B> msg.bienvenue.2=Heureux de servir nos amis Canadiens en franais. boutton.login=Authentifier boutton.logout=Quitter
ApplicationResources_en.properties
msg.bienvenue.1=<B>Welcome in XYZ application</B> msg.bienvenue.2=Happy to serve you in english. boutton.login=Login boutton.logout=Logout
ApplicationResources_es.properties
msg.bienvenue.1=<B>Recepcin en la aplicacin XYZ</B> msg.bienvenue.2=Feliz servirle en espaol boutton.login=Conexin boutton.logout=Fin de comunicacin
In this example, the default language is French. In addition to the default language, this application supports English and Spanish. For French speaking clients from Canada, a special resource has also been developed.