我需要翻譯我的應用程序,所以我要使用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
你可能希望針對示例代碼提出問題,或者至少建議他們詳細說明構建過程,如果在構建過程中創建了包。 –