Internationalization, frequently abbreviated i18n, is the process of designing an application that can be translated into various languages.
This generally involves placing translations in properties bundles with their names suffixed with the target locale, for instance, the messages_en.properties
, messages_en_US.properties
, and messages_fr.properties
files.
The correct property bundle is resolved by trying the most specific locale first and then falling back to the less specific ones.
For U.S English, if you try to get a translation from a bundle named x
, the application would first look in the x_en_US.properties
file, then the x_en.properties
file, and finally, the x.properties
file.
The first thing we will do is translate our error messages into French. To do this, we will rename our existing messages.properties
file to messages_en.properties
.
We will also create a second bundle named messages_fr.properties
:
Size.profileForm.twitterHandle=Veuillez entrer votre identifiant...