java - Muti language support in single web page -
I have a requirement that I have never experienced before. I have a web page in which I want to show the sentences of two languages. Like
How are you? (In English)
In a Spanish language
So far, I have used the concept of internationalization that will change the locale and change the entire web page (except for database driven values) In.
If the local language is set to Spanish, the entire form will be displayed in Spanish. The requirement here is that both the language string should be displayed next to each.
Update: Another way is to call it Then you can use the following stars: So in your case you need to define the object of two resources, each of them in English and Spanish.
The image of my sample web page is here
ResourceBundle and then moving it to
locale , Iam Pass
Dutch Locale and then you your
resouces folder Resource files should be in my case, I have English,
for messages_nl.properties
locale default locale = new locale ("nl", "nl"); Resource Bundle ResourcesBandle = ResourceBundle.getBundle ("Message", Default Local);
string greeting = resourceBundle.getString ("hello");
Comments
Post a Comment