Source Code : Java Internationalization: load string from properties

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Java Internationalization: load string from properties

Java Internationalization: load string from properties
        

public class HelloWorld {
  public static void main(String s[]) {
    System.out.println("Hello World!");
  }
}



import java.util.*;

public class HelloWorldResources {
  public static void main(String [] argv) {
    ResourceBundle resources;

    try {
      resources = ResourceBundle.getBundle("MyData");
      System.out.println(resources.getString("Hi"));
    } catch (MissingResourceException mre) {
      System.err.println("MyData.properties not found");
    }
  }
}

//MyData_fr.properties
Hi = Salut tout le monde!

//MyData.properties
Hi = Hello World!

           
         
    
    
    
    
    
    
    
  

Thank with us