Package org.freeplane.core.resources

Examples of org.freeplane.core.resources.ResourceBundles


   
  }
 
  private void setLanguage() {
    final String DEFAULT_LANGUAGE = "en";
    ResourceBundles resBundle = ((ResourceBundles)Controller.getCurrentController().getResourceController().getResources());
    String lang = resBundle.getLanguageCode();
    if (lang == null || lang.equals(ResourceBundles.LANGUAGE_AUTOMATIC)) {
      lang = DEFAULT_LANGUAGE;
    }
   
    URL res = this.getClass().getResource("/translations/Resources_"+lang+".properties");
    if (res == null) {
      lang = DEFAULT_LANGUAGE;
      res = this.getClass().getResource("/translations/Resources_"+lang+".properties");
    }
   
    if (res == null) {
      return;
    }
         
    resBundle.addResources(resBundle.getLanguageCode(), res);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.core.resources.ResourceBundles

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.