How to Add Multi Language Support in Java

How to perform Multilanguage Support in Java Programing Language

We can Do multilanguage support using Java.util package's ResourceBundle Class.
Steps to give multilanuage support in Java
1. Create Property file with name
2. Create Property file in each language with language code extension
ex: //For english US Local //fr- french FR- For France
3. Add the language datas in property file as below
i) Open
ii) Add the Words to be translated in Key value format like below

# In and file

4. Similarly Add for other Languages file

4. Create java program to use the property file

import java.util.Local;
import java,util.ResourceBundle;
public multiLanguage{
public static void main(String arg[]){
Locale currentLocale= new Locale("fr", "FR");
ResourceBundle rb = ResourceBundle.getBundle("MessagesBundle", currentLocale);

1. Keys in Progperty file Should not have any spaces and special characters
2. Place the java classes and property file should be in same directory

How to Add Multilanguage support in JSP

It is similar to Giving multilanguage support in Java the only difference is here we have to place the property file in "WEB-INF/classes" folder

Related Topic The Better Mobile Open Source Platform
Android Application Development SDK Dalvik Virtual Machine
List of Server Ports and their Assigned Numbers
Servlet Interview Questions & Answers
JSP Interview Questions & Answers 2011   Privacy Policy  Terms of Service  Feedback