我需要翻译我的应用程序,所以我要使用gettext,共同从http://code.google.com/p/gettext-commonsgettext的,常见的例子不工作
我检查了SVN,并试图编译示例:
javac -classpath ../java I18nExample.java
java -classpath ../../target/gettext-commons-0.9.6.jar:. I18nExample
该程序不会给我目标输出;我完全不知道发生了什么事!
看起来de.properties
完全被忽略。如果我在Factory的构造函数中将属性文件设置为"de"
,我会得到一部分我想看到的输出。
在互联网上有没有任何地方的java的gettext的工作示例?
这是从示例脚本输出:
First run
This text is marked for translation and is translated
This text is marked for translation but not translated
This text is marked for translation but not translated
Four: 4
chat
chat
1 file is open
2 files are open
Second run
This text is marked for translation and is translated
This text is marked for translation but not translated
This text is marked for translation but not translated
Four: 4
chat
chat
1 file is open
2 files are open
你能提供一个简单的例子,说明什么是工作而不工作? –
http://code.google.com/p/gettext-commons/source/browse/#svn%2Ftrunk%2Fsrc%2Fexamples这就是例子 - 当我运行所有字符串都在en,而不是部分在 – reox
你可能希望针对示例代码提出问题,或者至少建议他们详细说明构建过程,如果在构建过程中创建了包。 –