diff --git a/assets/data/help/MiniHelp.zh_TW.fb2 b/assets/data/help/MiniHelp.zh_TW.fb2 new file mode 100644 index 000000000..6bbf6ee40 --- /dev/null +++ b/assets/data/help/MiniHelp.zh_TW.fb2 @@ -0,0 +1,19 @@ + + +FBReader 關於FBReaderJ en + +<p>關於 FBReader &FBReaderVersion;</p> +

FBReader 是一個電子書藉閱覽器。FBReader 支援ePubfb2檔案格式。FBReader 現時不支援受DRM保護的文年。如你有受支援的書藉,只需將檔案放到SD記憶卡內的Books文件夾,該書即會在書庫出現。 網絡書庫 有大量電子書藉可供免費下載或購買。

+

你可以手指橫向滑過屏幕或使用音量鍵翻頁。

+

FBReader 擁有強大的自訂功能。你可於設定內自行設定顏色、字型、目錄及翻頁選項等等。

+

如你的手機沒有實體Menu鍵, 輕觸屏幕下方正中位置打開選單。

+

Enjoy!

+ +

相關網位

+

欲知更多關於 FBReader 的資訊,可瀏覽我們的網位

+

發佈公告及其他消息亦會於twitter公佈。

+

如有任何問題或建議,歡迎到FBReader的Google群留言。

+

如你喜歡本軟件,可以考慮給序一點支持

+

聯給作者: 電郵

+ +
diff --git a/assets/resources/application/en.xml b/assets/resources/application/en.xml index 76b847570..b900efddc 100644 --- a/assets/resources/application/en.xml +++ b/assets/resources/application/en.xml @@ -1,4 +1,5 @@ + diff --git a/assets/resources/application/zh_TW.xml b/assets/resources/application/zh_TW.xml new file mode 100644 index 000000000..de3d95e7e --- /dev/null +++ b/assets/resources/application/zh_TW.xml @@ -0,0 +1,696 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/resources/zlibrary/zh_TW.xml b/assets/resources/zlibrary/zh_TW.xml new file mode 100644 index 000000000..13911d698 --- /dev/null +++ b/assets/resources/zlibrary/zh_TW.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/org/geometerplus/fbreader/library/Library.java b/src/org/geometerplus/fbreader/library/Library.java index 471133345..1ea4b995e 100644 --- a/src/org/geometerplus/fbreader/library/Library.java +++ b/src/org/geometerplus/fbreader/library/Library.java @@ -68,8 +68,17 @@ public final class Library { } public static ZLResourceFile getHelpFile() { - final ZLResourceFile file = ZLResourceFile.createResourceFile( - "data/help/MiniHelp." + Locale.getDefault().getLanguage() + ".fb2" + final Locale locale = Locale.getDefault(); + + ZLResourceFile file = ZLResourceFile.createResourceFile( + "data/help/MiniHelp." + locale.getLanguage() + "_" + locale.getCountry() + ".fb2" + ); + if (file.exists()) { + return file; + } + + file = ZLResourceFile.createResourceFile( + "data/help/MiniHelp." + locale.getLanguage() + ".fb2" ); if (file.exists()) { return file; diff --git a/src/org/geometerplus/zlibrary/core/resources/ZLTreeResource.java b/src/org/geometerplus/zlibrary/core/resources/ZLTreeResource.java index e95a4eaa9..64e9e6658 100644 --- a/src/org/geometerplus/zlibrary/core/resources/ZLTreeResource.java +++ b/src/org/geometerplus/zlibrary/core/resources/ZLTreeResource.java @@ -30,6 +30,7 @@ final class ZLTreeResource extends ZLResource { private static long ourTimeStamp = 0; private static String ourLanguage = null; + private static String ourCountry = null; private boolean myHasValue; private String myValue; @@ -38,11 +39,9 @@ final class ZLTreeResource extends ZLResource { public static void buildTree() { if (ourRoot == null) { ourRoot = new ZLTreeResource("", null); - loadData("en"); - ourLanguage = Locale.getDefault().getLanguage(); - if (!"en".equals(ourLanguage)) { - loadData(ourLanguage); - } + ourLanguage = "en"; + ourCountry = "UK"; + loadData(); } } @@ -53,22 +52,29 @@ final class ZLTreeResource extends ZLResource { if (timeStamp > ourTimeStamp + 1000) { ourTimeStamp = timeStamp; final String language = Locale.getDefault().getLanguage(); - if (language != null && !language.equals(ourLanguage)) { + final String country = Locale.getDefault().getCountry(); + if ((language != null && !language.equals(ourLanguage)) || + (country != null && !country.equals(ourCountry))) { ourLanguage = language; - loadData(ourLanguage); + ourCountry = country; + loadData(); } } } } } - public static void loadData(String language) { - final String fileName = language + ".xml"; - ResourceTreeReader reader = new ResourceTreeReader(); + private static void loadData(ResourceTreeReader reader, String fileName) { reader.readDocument(ourRoot, ZLResourceFile.createResourceFile("resources/zlibrary/" + fileName)); reader.readDocument(ourRoot, ZLResourceFile.createResourceFile("resources/application/" + fileName)); } + private static void loadData() { + ResourceTreeReader reader = new ResourceTreeReader(); + loadData(reader, ourLanguage + ".xml"); + loadData(reader, ourLanguage + "_" + ourCountry + ".xml"); + } + private ZLTreeResource(String name, String value) { super(name); setValue(value);