Mega Code Archive

 
Categories / Java Tutorial / Internationalization
 

Text Bundle

import java.util.ListResourceBundle; class TextBundle extends ListResourceBundle {   public Object[][] getContents() {     return contents;   }   static final Object[][] contents = { { "dog", "dog" }, { "cat", "cat" }, { "horse", "horse" },       { "cow", "cow" }, { "elephant", "elephant" } }; } class TextBundle_es extends ListResourceBundle {   public Object[][] getContents() {     return contents;   }   static final Object[][] contents = { { "dog", "perro" }, { "cat", "gato" },       { "horse", "caballo" }, { "cow", "vaca" }, { "elephant", "elefante" } }; }