This library eases the designing of simple html multi-language web pages.
The idea is simple:
- Create a template of the html to convert to multilanguage.
- Create properties files with keys to ve replaced in the template for every language.
- Once you have the valid html
- Just replace the language depending texts by labels, with format: /*LABEL*/
- Those labels will be placed as keys in a properties file for every language
- A generic base class Servlet: LanguageWebGenServlet works by taking the html template (with the texts replaced by labels), and, with the language of the request, replace Labels for texts.
- You will have to create a derived class of that servlet, with the particular location of your html template
There is a usage example at folder ./UsageExample/
language-web-servlet uses some dependencies:
- juniversalchardet 1.0.3 - Library for detecting charsets of text files.
- jquery.cookiebar plugin - cookie bar
- jQuery - duh
And of course language-web-servlet itself is open source with a [public repository][dill] on GitHub.
Just compile the sources:
cd Folder
mvn clean install
And add the dependency to your Java application
<dependency>
<groupId>com.frojasg1</groupId>
<artifactId>language-web-servlet</artifactId>
<version>v1.0-SNAPSHOT</version>
</dependency>
Free software
But you have to comply with the licenses of dependencies. If you want to use the flag icons, you will have to buy them at: iconfinder
Free Software, Hell Yeah!