Package barrysoft.localization

Examples of barrysoft.localization.Localization


   
    Hashtable<String, String> words = new Hashtable<String, String>();
   
    words.put("WORD1", "This is %1 faulty.");
   
    Localization localization = new Localization();
    localization.addLocalization("Italian", words);
    localization.setCurrentLocalization("Italian");
   
    System.out.println(localization.getLocalized("WORD1", "NOT"));
   
  }
View Full Code Here


 
  public Plugin() {
   
    statusShowers = new ArrayList<PluginStatusShower>();
    options = new Options();
    localization = new Localization();
    configuration = new Configuration(XML_ROOT);
   
    getConfiguration().addConfiguration(PluginInfo.XML_ROOT, getInfo());
    getConfiguration().addConfiguration(Options.XML_ROOT, getOptions());
    getConfiguration().addConfiguration(Localization.XML_ROOT, getLocalization());
View Full Code Here

public class LocalizationTest {

  @Test
  public void testLocalization() {
   
    Localization localization = new Localization();
   
    Hashtable<String, String> values = new Hashtable<String, String>();
   
    values.put("TEST1", "This is a string[br]yeah");
   
    localization.addLocalization("English", values);
    localization.setCurrentLocalization("English");
   
    String t = localization.getLocalized("TEST1");
   
    if (t.lastIndexOf('\n') == -1)
      fail("Can't find new line");

   
View Full Code Here

TOP

Related Classes of barrysoft.localization.Localization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.