【发布时间】:2017-10-08 16:05:27
【问题描述】:
阿罗哈,
-
你能解释一下这个文件有什么好处吗? 在项目资源管理器中 -> Gradle: org.controlsfx:controlsfx:8.40.12 -> Resource Bundel 'controlsfx' -> 这里是不同语言的不同文件。我可以用这个翻译我的 Programm 内容英语、德国、波兰语吗?我可以让它可编辑吗
2.如果第一个是一个愚蠢的想法,我该如何翻译? 我的想法是让翻译属性湖这个english.properties,Germany.properties,polish.properties 节省资源 用这个加载
stateManager.setPersistenceMode(StateManager.PersistenceMode.USER);试试{ input = new FileInputStream( stateManager.getProperty("Languge").orElse("").toString().trim()+".properties");// 加载一个属性文件 prop.load(输入);
// get the property value and print it out System.out.println(prop.getProperty("database")); System.out.println(prop.getProperty("dbuser")); System.out.println(prop.getProperty("dbpassword")); } catch (IOException ex) { ex.printStackTrace(); } finally { if (input != null) { try { input.close(); } catch (IOException e) { e.printStackTrace(); } } }
【问题讨论】:
标签: javafx gluon gluon-desktop