# Localtransformer Demo properties file
title=Products Purchase
label2=Write the Locale in the Textbox
label3=Then press the Change Language Button
buttonChange=Change Language
label5=Product : Mobile Phone KTS 1000
buttonBuy=Buy
private ResourceBundle resStrings;
try {
resStrings = ResourceBundle.getBundle("LocalTransformerStrings", new Locale("de"));
UpdateDisplayWithLocalStrings();
}
catch (Exception e)
{
...
}
In order to update the display we execute the UpdateDisplayWithLocalStrings function which is defined as:
private void UpdateDisplayWithLocalStrings()
{
this.setTitle(resStrings.getString("title"));
label2.setText(resStrings.getString("label2"));
label3.setText(resStrings.getString("label3"));
label5.setText(resStrings.getString("label5"));
buttonChange.setText(resStrings.getString("buttonChange"));
buttonBuy.setText(resStrings.getString("buttonBuy"));
}