Multilingual apps
28/05/2009. Evangelina Martinez Ruiz Moreno
We often find ourselves in the situation of developing a web application that has to be able to support different languages.
This is not a minor issue and there are lots of things to take into account, static HTML content, dynamic content, images, database support, banners, and that is just to mention a few.
We can have independent applications for each language or we can make a single application that copes with every language we want to offer.
JRapid comes to our rescue and offers a simple solution.
All you have to do is add a few extra entities on your xml code. One of those entities has to have the stereotype Language. This means it will have extra functionality attached to it during the generation. Through this entity we will specify all the languages we want to offer in our application.
Now that we have our languages specified, we have to be able to store the information in each one of them. In order to accomplish this we need to create a new entity of stereotype LangValue that will be responsible of holding the content for each language.
Each entity LangValue will hold a specific data type, so we need to have as many LangValue entities as types we want to store.
Not so difficult right? This solves our problem of storing the contents of our application, but what about the static HTML content?
For that JRapid has the .lang files, you can learn more about them in the article ?Not my mother tongue: projects abroad & foreign languages?. Another solution would be through Java, since it has classes that support internationalization, for more information go to http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp.html .
So that pretty much covers it. As an example you can check the multilingual site http://www.embrasil.com/ programmed in JRapid.