From c641aeea581531f7879bed831d298a95fd325f7f Mon Sep 17 00:00:00 2001 From: wogong Date: Sat, 4 May 2013 10:46:10 +0800 Subject: [PATCH 1/8] add charset utf-8 in index.php, fix the display problem in Chinese --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 7b9c8f9..6351a3d 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,7 @@ $withToolbar = false; if (!isset($_COOKIE['toolbar'])) $withToolbar = true; - header ("Content-Type:application/xhtml+xml"); + header ("Content-Type:application/xhtml+xml;charset=utf-8"); $page = getURLParam ("page", Base::PAGE_INDEX); $query = getURLParam ("query"); $qid = getURLParam ("id"); From cc0dcd59c49e97fcac4bbf2eda1d419d58ea3df5 Mon Sep 17 00:00:00 2001 From: wogong Date: Sat, 4 May 2013 10:53:55 +0800 Subject: [PATCH 2/8] add Chinese localozation file --- lang/Localization_zh.json | 137 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 lang/Localization_zh.json diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json new file mode 100644 index 0000000..7f2f319 --- /dev/null +++ b/lang/Localization_zh.json @@ -0,0 +1,137 @@ +{ +"boolean.no":"否", +"boolean.yes":"是", +"splitByLetter.letter":"{0} 以 {1} 开始", +"home.title":"目录", +"link.fullentry":"全部条目", +"title.nextpage":"下一页 ({0} of {1})", +"title.lastpage":"最后一页 (last)", +"title.numberOfPages":"{0} (共 {1} 页)", +"pubdate.title":"出版时间", +"bookword.title":"书籍名称", +"bookword.none":"没有书籍", +"bookword.one":"一本书籍", +"bookword.many":"{0} 本书籍", +"authorword.title":"作者", +"authorword.none":"未知", +"authorword.one":"1 位作者", +"authorword.many":"{0} 作者", +"taglevelword.title":"Tag levels", +"taglevelword.none":"No tag level", +"taglevelword.one":"1 tag level", +"taglevelword.many":"{0} tag levels", +"seriesword.title":"Series", +"seriesword.none":"No series", +"seriesword.one":"1 series", +"seriesword.many":"{0} series", +"tagword.title":"标签", +"tagword.none":"没有标签", +"tagword.one":"1 tag", +"tagword.many":"{0} tags", +"content.tags":"Tags:", +"content.series":"Series:", +"content.series.data":"Book {0} in the {1} series", +"content.publisher":"Publisher:", +"content.published":"Published:", +"content.added":"Added: ", +"content.modified":"Modified:", +"content.publisher.data":"Published {1} by {0}", +"content.summary":"Summary", +"bookentry.series":"Book {0} in the {1} series", +"bookentry.author":"{0} by {1}", +"bookentry.tags":"{0} in {1}", +"bookentry.ratings":"{0} rated {1}", +"bookentry.goodreads":"This book on Goodreads", +"bookentry.goodreads.review":"Review this book on Goodreads", +"bookentry.goodreads.author":"{0} on Goodreads", +"bookentry.wikipedia":"This book on Wikipedia", +"bookentry.wikipedia.author":"{0} on Wikipedia", +"bookentry.librarything":"This book on LibraryThing", +"bookentry.librarything.author":"{0} on LibraryThing", +"bookentry.amazon":"This book on Amazon", +"bookentry.amazon.author":"{0} on Amazon", +"bookentry.isfdb.author":"{0} on ISFDB", +"bookentry.download":"Download this ebook as {0}", +"bookentry.rated":"{0} {1}", +"bookentry.fullentrylink":"Full entry", +"tags.title":"Tags", +"tags.categorized":"Categorized index of the {0} tags", +"tags.categorized.single":"Categorized index of the single tag - very useful indeed ;)", +"tags.alphabetical.many":"Alphabetical index of the {0} tags", +"tags.alphabetical.one":"Alphabetical index of the single tag - very useful indeed ;)", +"tags.alphabetical.none":"Alphabetical index of absolutely no tag - very useful indeed ;)", +"splitByLetter.tag.other":"Other tags", +"authors.series.title":"Series: {0}", +"authors.title":"Authors", +"authors.alphabetical.many":"Alphabetical index of the {0} authors", +"authors.alphabetical.one":"Alphabetical index of the single author - very useful indeed ;)", +"authors.alphabetical.none":"Alphabetical index of absolutely no author - very useful indeed ;)", +"splitByLetter.author.other":"Other authors", +"series.title":"Series", +"series.alphabetical.many":"Alphabetical index of the {0} series", +"series.alphabetical.one":"Alphabetical index of the single series - very useful indeed ;)", +"series.alphabetical.none":"Alphabetical index of absolutely no series - very useful indeed ;)", +"splitByLetter.series.other":"Other series", +"recent.title":"Recent additions", +"recent.list":"{0} most recent books", +"recent.list.single":"Most recent single book - very useful indeed ;)", +"rating.title":"Rating", +"rating.summary":"{0}, grouped by rating", +"allbooks.title":"All books", +"allbooks.alphabetical.many":"Alphabetical index of the {0} books", +"allbooks.alphabetical.one":"Alphabetical index of the single book - very useful indeed ;)", +"allbooks.alphabetical.none":"Alphabetical index of absolutely no book - very useful indeed ;)", +"splitByLetter.book.other":"Other books", +"main.title":"Calibre library", +"main.summary":"{0} has catalogued {1}", +"startup.newhome":"Default configuration folder home redirected to {0}", +"startup.redirectfound":".redirect file found in {0}", +"startup.redirectreadfail":"... failure reading .redirect file", +"startup.redirectnotfound":"... unable to find redirect folder {0}", +"startup.redirectabandoned":"... so redirect abandoned", +"startup.redirecting":"redirecting home folder to {0}", +"startup.configusing":"Using configuration folder {0}", +"startup.folderuserhome":"Try configuration folder in user home folder {0}", +"startup.foldertilde":"Try configuration folder from tilde folder {0}", +"startup.folderjar":"Try configuration folder from .jar location {0}", +"startup.foldernotexist":"... but specified folder does not exist", +"i18n.and":"and", +"i18n.downloads":"Downloads, links and other catalogs", +"i18n.links":"Links and other catalogs", +"i18n.coversection":"Cover", +"i18n.downloadfile":"Download file", +"i18n.downloadsection":"Downloads", +"i18n.relatedsection":"Related catalogs", +"i18n.linksection":"External links", +"i18n.backToMain":"Back to the main page of the catalog", +"i18n.summarysection":"Description", +"i18n.dateGenerated":"Catalog generated on {0}", +"deeplevel.summary":"{0} broken up by authors, tags, etc. ", +"about.title":"About COPS", +"about.summary":"Notes on using Calibre2Opds", +"usage.intro":"The options are taken from the configuration file located at {0}", +"config.Language.label":"Language", +"config.Language.description":"This setting changes the language used by the program ; use the standard ISO language code (e.g. EN, FR, DE...)", +"config.Language.possible":"Possible values : {0}", +"intro.goal":"Generate OPDS and HTML catalogs from your Calibre ebooks database", +"intro.wiki.title":"The project''s home : ", +"intro.wiki.url":"http://calibre2opds.com", +"intro.team.title":"The Calibre2Opds team :", +"intro.team.list1":"David Pierron - main programmer", +"intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire", +"intro.team.list3":"Farid Soussi - css and html guru", +"intro.team.list4":"Douglas Steele - programmer", +"intro.team.list5":"Jane Litte - beta tester and moral support", +"intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ", +"intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !", +"search.result":"Search result for *{0}*", +"search.sortorder.asc":"Asc", +"search.sortorder.desc":"Desc", +"permalink.alternate":"Permalink", +"home.alternate":"Home", +"search.alternate":"Search", +"sort.alternate":"Sort", +"paging.next.alternate":"Next", +"paging.previous.alternate":"Previous", +"fin":"fin" +} From e2dd39dfdd799cb1743a0f99a58befc734a78e95 Mon Sep 17 00:00:00 2001 From: wogong Date: Sat, 4 May 2013 11:53:21 +0800 Subject: [PATCH 3/8] Chinese localize basicly OK --- base.php | 10 +++++-- lang/Localization_zh.json | 58 +++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/base.php b/base.php index 874569d..981cfb6 100644 --- a/base.php +++ b/base.php @@ -126,10 +126,10 @@ function localize($phrase, $count=-1) { static $translations = NULL; /* If no instance of $translations has occured load the language file */ if (is_null($translations)) { - $lang = "en"; + $lang = "zh"; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + //$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); } $lang_file_en = NULL; $lang_file = 'lang/Localization_' . $lang . '.json'; @@ -140,8 +140,12 @@ function localize($phrase, $count=-1) { $lang_file_en = 'lang/' . 'Localization_en.json'; } $lang_file_content = file_get_contents($lang_file); + //var_dump($lang_file); + //var_dump($lang_file_content); /* Load the language file as a JSON object and transform it into an associative array */ $translations = json_decode($lang_file_content, true); + //var_dump($translations['boolean.no']); + //var_dump($translations['authors.title']); if ($lang_file_en) { $lang_file_content = file_get_contents($lang_file_en); @@ -724,4 +728,4 @@ abstract class Base } } -?> \ No newline at end of file +?> diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json index 7f2f319..c2f57eb 100644 --- a/lang/Localization_zh.json +++ b/lang/Localization_zh.json @@ -8,14 +8,14 @@ "title.lastpage":"最后一页 (last)", "title.numberOfPages":"{0} (共 {1} 页)", "pubdate.title":"出版时间", -"bookword.title":"书籍名称", +"bookword.title":"书名", "bookword.none":"没有书籍", -"bookword.one":"一本书籍", +"bookword.one":"1 本书籍", "bookword.many":"{0} 本书籍", "authorword.title":"作者", "authorword.none":"未知", "authorword.one":"1 位作者", -"authorword.many":"{0} 作者", +"authorword.many":"{0} 位作者", "taglevelword.title":"Tag levels", "taglevelword.none":"No tag level", "taglevelword.one":"1 tag level", @@ -32,11 +32,11 @@ "content.series":"Series:", "content.series.data":"Book {0} in the {1} series", "content.publisher":"Publisher:", -"content.published":"Published:", +"content.published":"出版时间", "content.added":"Added: ", "content.modified":"Modified:", "content.publisher.data":"Published {1} by {0}", -"content.summary":"Summary", +"content.summary":"概要", "bookentry.series":"Book {0} in the {1} series", "bookentry.author":"{0} by {1}", "bookentry.tags":"{0} in {1}", @@ -54,31 +54,31 @@ "bookentry.download":"Download this ebook as {0}", "bookentry.rated":"{0} {1}", "bookentry.fullentrylink":"Full entry", -"tags.title":"Tags", +"tags.title":"标签", "tags.categorized":"Categorized index of the {0} tags", "tags.categorized.single":"Categorized index of the single tag - very useful indeed ;)", -"tags.alphabetical.many":"Alphabetical index of the {0} tags", +"tags.alphabetical.many":"{0} 个标签的字母索引", "tags.alphabetical.one":"Alphabetical index of the single tag - very useful indeed ;)", "tags.alphabetical.none":"Alphabetical index of absolutely no tag - very useful indeed ;)", "splitByLetter.tag.other":"Other tags", "authors.series.title":"Series: {0}", -"authors.title":"Authors", -"authors.alphabetical.many":"Alphabetical index of the {0} authors", +"authors.title":"作者", +"authors.alphabetical.many":"{0} 位作者的字母索引", "authors.alphabetical.one":"Alphabetical index of the single author - very useful indeed ;)", "authors.alphabetical.none":"Alphabetical index of absolutely no author - very useful indeed ;)", "splitByLetter.author.other":"Other authors", -"series.title":"Series", -"series.alphabetical.many":"Alphabetical index of the {0} series", +"series.title":"系列", +"series.alphabetical.many":"{0} 个系列的字母索引", "series.alphabetical.one":"Alphabetical index of the single series - very useful indeed ;)", "series.alphabetical.none":"Alphabetical index of absolutely no series - very useful indeed ;)", "splitByLetter.series.other":"Other series", -"recent.title":"Recent additions", -"recent.list":"{0} most recent books", +"recent.title":"最近添加", +"recent.list":"{0} 本最近添加的书", "recent.list.single":"Most recent single book - very useful indeed ;)", "rating.title":"Rating", "rating.summary":"{0}, grouped by rating", -"allbooks.title":"All books", -"allbooks.alphabetical.many":"Alphabetical index of the {0} books", +"allbooks.title":"所有书籍", +"allbooks.alphabetical.many":"{0} 本书籍的字母索引", "allbooks.alphabetical.one":"Alphabetical index of the single book - very useful indeed ;)", "allbooks.alphabetical.none":"Alphabetical index of absolutely no book - very useful indeed ;)", "splitByLetter.book.other":"Other books", @@ -98,19 +98,19 @@ "i18n.and":"and", "i18n.downloads":"Downloads, links and other catalogs", "i18n.links":"Links and other catalogs", -"i18n.coversection":"Cover", -"i18n.downloadfile":"Download file", -"i18n.downloadsection":"Downloads", +"i18n.coversection":"封面", +"i18n.downloadfile":"下载文件", +"i18n.downloadsection":"下载", "i18n.relatedsection":"Related catalogs", "i18n.linksection":"External links", "i18n.backToMain":"Back to the main page of the catalog", -"i18n.summarysection":"Description", +"i18n.summarysection":"描述", "i18n.dateGenerated":"Catalog generated on {0}", "deeplevel.summary":"{0} broken up by authors, tags, etc. ", -"about.title":"About COPS", -"about.summary":"Notes on using Calibre2Opds", +"about.title":"关于COPS", +"about.summary":"关于Calibre2Opds的说明", "usage.intro":"The options are taken from the configuration file located at {0}", -"config.Language.label":"Language", +"config.Language.label":"语言", "config.Language.description":"This setting changes the language used by the program ; use the standard ISO language code (e.g. EN, FR, DE...)", "config.Language.possible":"Possible values : {0}", "intro.goal":"Generate OPDS and HTML catalogs from your Calibre ebooks database", @@ -125,13 +125,13 @@ "intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ", "intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !", "search.result":"Search result for *{0}*", -"search.sortorder.asc":"Asc", -"search.sortorder.desc":"Desc", +"search.sortorder.asc":"升序", +"search.sortorder.desc":"降序", "permalink.alternate":"Permalink", -"home.alternate":"Home", -"search.alternate":"Search", -"sort.alternate":"Sort", -"paging.next.alternate":"Next", -"paging.previous.alternate":"Previous", +"home.alternate":"首页", +"search.alternate":"搜索", +"sort.alternate":"排序", +"paging.next.alternate":"下一页", +"paging.previous.alternate":"上一页", "fin":"fin" } From 0e6320e5a3d8085779e8c2e2f47bd3188c10d2f3 Mon Sep 17 00:00:00 2001 From: wogong Date: Tue, 7 May 2013 09:18:07 +0800 Subject: [PATCH 4/8] remove debug codes --- base.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/base.php b/base.php index 981cfb6..8a5a49f 100644 --- a/base.php +++ b/base.php @@ -140,12 +140,8 @@ function localize($phrase, $count=-1) { $lang_file_en = 'lang/' . 'Localization_en.json'; } $lang_file_content = file_get_contents($lang_file); - //var_dump($lang_file); - //var_dump($lang_file_content); /* Load the language file as a JSON object and transform it into an associative array */ $translations = json_decode($lang_file_content, true); - //var_dump($translations['boolean.no']); - //var_dump($translations['authors.title']); if ($lang_file_en) { $lang_file_content = file_get_contents($lang_file_en); From 9908d8e8fa3d45e5e46bc16a2026ba92d605aec6 Mon Sep 17 00:00:00 2001 From: wogong Date: Tue, 7 May 2013 09:30:03 +0800 Subject: [PATCH 5/8] update Localization_zh.json --- lang/Localization_zh.json | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json index c2f57eb..5e6e40f 100644 --- a/lang/Localization_zh.json +++ b/lang/Localization_zh.json @@ -5,7 +5,7 @@ "home.title":"目录", "link.fullentry":"全部条目", "title.nextpage":"下一页 ({0} of {1})", -"title.lastpage":"最后一页 (last)", +"title.lastpage":"最后一页", "title.numberOfPages":"{0} (共 {1} 页)", "pubdate.title":"出版时间", "bookword.title":"书名", @@ -20,40 +20,40 @@ "taglevelword.none":"No tag level", "taglevelword.one":"1 tag level", "taglevelword.many":"{0} tag levels", -"seriesword.title":"Series", -"seriesword.none":"No series", -"seriesword.one":"1 series", -"seriesword.many":"{0} series", +"seriesword.title":"系列", +"seriesword.none":"没有系列", +"seriesword.one":"1 个系列", +"seriesword.many":"{0} 系列", "tagword.title":"标签", "tagword.none":"没有标签", -"tagword.one":"1 tag", -"tagword.many":"{0} tags", -"content.tags":"Tags:", -"content.series":"Series:", -"content.series.data":"Book {0} in the {1} series", -"content.publisher":"Publisher:", +"tagword.one":"1 个标签", +"tagword.many":"{0} 标签", +"content.tags":"标签:", +"content.series":"系列:", +"content.series.data":"{0} 系列的第 {0} 本", +"content.publisher":"出版社:", "content.published":"出版时间", -"content.added":"Added: ", -"content.modified":"Modified:", -"content.publisher.data":"Published {1} by {0}", +"content.added":"添加了: ", +"content.modified":"修改了:", +"content.publisher.data":"由 {0} 出版于 {1}", "content.summary":"概要", "bookentry.series":"Book {0} in the {1} series", -"bookentry.author":"{0} by {1}", -"bookentry.tags":"{0} in {1}", -"bookentry.ratings":"{0} rated {1}", -"bookentry.goodreads":"This book on Goodreads", -"bookentry.goodreads.review":"Review this book on Goodreads", -"bookentry.goodreads.author":"{0} on Goodreads", -"bookentry.wikipedia":"This book on Wikipedia", -"bookentry.wikipedia.author":"{0} on Wikipedia", -"bookentry.librarything":"This book on LibraryThing", -"bookentry.librarything.author":"{0} on LibraryThing", -"bookentry.amazon":"This book on Amazon", -"bookentry.amazon.author":"{0} on Amazon", -"bookentry.isfdb.author":"{0} on ISFDB", -"bookentry.download":"Download this ebook as {0}", +"bookentry.author":"{0} 由作者 {1}", +"bookentry.tags":"{0} 在标签 {1}", +"bookentry.ratings":"{0} 评分 {1}", +"bookentry.goodreads":"Goodreads 上的这本书", +"bookentry.goodreads.review":"在 Goodreads上评论这本书", +"bookentry.goodreads.author":"{0} 在 Goodreads", +"bookentry.wikipedia":"维基百科上的这本书", +"bookentry.wikipedia.author":"{0} 在维基百科上", +"bookentry.librarything":"LibraryThing 上的这本书", +"bookentry.librarything.author":"{0} 在 LibraryThing", +"bookentry.amazon":"Amazon上的这本书", +"bookentry.amazon.author":"{0} 在 Amazon", +"bookentry.isfdb.author":"{0} 在 ISFDB", +"bookentry.download":"下载这本书 {0}", "bookentry.rated":"{0} {1}", -"bookentry.fullentrylink":"Full entry", +"bookentry.fullentrylink":"全部条目", "tags.title":"标签", "tags.categorized":"Categorized index of the {0} tags", "tags.categorized.single":"Categorized index of the single tag - very useful indeed ;)", From a63e3aded350aecc18b049dfbb13f72e33458760 Mon Sep 17 00:00:00 2001 From: wogong Date: Tue, 7 May 2013 09:40:21 +0800 Subject: [PATCH 6/8] update zh --- lang/Localization_zh.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json index 5e6e40f..1e5960a 100644 --- a/lang/Localization_zh.json +++ b/lang/Localization_zh.json @@ -1,7 +1,7 @@ { "boolean.no":"否", "boolean.yes":"是", -"splitByLetter.letter":"{0} 以 {1} 开始", +"splitByLetter.letter":"{0} 以 {1} 开头", "home.title":"目录", "link.fullentry":"全部条目", "title.nextpage":"下一页 ({0} of {1})", From 4c3f9b2820cc3bd86d9337c87317f194e7b46668 Mon Sep 17 00:00:00 2001 From: wogong Date: Tue, 7 May 2013 16:29:17 +0800 Subject: [PATCH 7/8] zh localize almost done --- base.php | 2 +- lang/Localization_zh.json | 44 +++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/base.php b/base.php index 8a5a49f..992fa8b 100644 --- a/base.php +++ b/base.php @@ -126,7 +126,7 @@ function localize($phrase, $count=-1) { static $translations = NULL; /* If no instance of $translations has occured load the language file */ if (is_null($translations)) { - $lang = "zh"; + $lang = "en"; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { //$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); diff --git a/lang/Localization_zh.json b/lang/Localization_zh.json index 1e5960a..b0ad7aa 100644 --- a/lang/Localization_zh.json +++ b/lang/Localization_zh.json @@ -60,29 +60,29 @@ "tags.alphabetical.many":"{0} 个标签的字母索引", "tags.alphabetical.one":"Alphabetical index of the single tag - very useful indeed ;)", "tags.alphabetical.none":"Alphabetical index of absolutely no tag - very useful indeed ;)", -"splitByLetter.tag.other":"Other tags", -"authors.series.title":"Series: {0}", +"splitByLetter.tag.other":"其他标签", +"authors.series.title":"系列: {0}", "authors.title":"作者", "authors.alphabetical.many":"{0} 位作者的字母索引", "authors.alphabetical.one":"Alphabetical index of the single author - very useful indeed ;)", "authors.alphabetical.none":"Alphabetical index of absolutely no author - very useful indeed ;)", -"splitByLetter.author.other":"Other authors", +"splitByLetter.author.other":"其他作者", "series.title":"系列", "series.alphabetical.many":"{0} 个系列的字母索引", "series.alphabetical.one":"Alphabetical index of the single series - very useful indeed ;)", "series.alphabetical.none":"Alphabetical index of absolutely no series - very useful indeed ;)", -"splitByLetter.series.other":"Other series", +"splitByLetter.series.other":"其他系列", "recent.title":"最近添加", "recent.list":"{0} 本最近添加的书", "recent.list.single":"Most recent single book - very useful indeed ;)", "rating.title":"Rating", -"rating.summary":"{0}, grouped by rating", +"rating.summary":"{0}, 根据评分分组", "allbooks.title":"所有书籍", "allbooks.alphabetical.many":"{0} 本书籍的字母索引", "allbooks.alphabetical.one":"Alphabetical index of the single book - very useful indeed ;)", "allbooks.alphabetical.none":"Alphabetical index of absolutely no book - very useful indeed ;)", -"splitByLetter.book.other":"Other books", -"main.title":"Calibre library", +"splitByLetter.book.other":"其他书籍", +"main.title":"Calibre 书架", "main.summary":"{0} has catalogued {1}", "startup.newhome":"Default configuration folder home redirected to {0}", "startup.redirectfound":".redirect file found in {0}", @@ -95,28 +95,28 @@ "startup.foldertilde":"Try configuration folder from tilde folder {0}", "startup.folderjar":"Try configuration folder from .jar location {0}", "startup.foldernotexist":"... but specified folder does not exist", -"i18n.and":"and", -"i18n.downloads":"Downloads, links and other catalogs", -"i18n.links":"Links and other catalogs", +"i18n.and":"和", +"i18n.downloads":"下载,链接和其他目录 ", +"i18n.links":"链接和其他目录", "i18n.coversection":"封面", "i18n.downloadfile":"下载文件", "i18n.downloadsection":"下载", -"i18n.relatedsection":"Related catalogs", -"i18n.linksection":"External links", -"i18n.backToMain":"Back to the main page of the catalog", +"i18n.relatedsection":"相关目录", +"i18n.linksection":"外部链接", +"i18n.backToMain":"返回目录主页", "i18n.summarysection":"描述", -"i18n.dateGenerated":"Catalog generated on {0}", +"i18n.dateGenerated":"目录生成于 {0}", "deeplevel.summary":"{0} broken up by authors, tags, etc. ", "about.title":"关于COPS", "about.summary":"关于Calibre2Opds的说明", -"usage.intro":"The options are taken from the configuration file located at {0}", +"usage.intro":"选项从此配置文件生成 {0}", "config.Language.label":"语言", -"config.Language.description":"This setting changes the language used by the program ; use the standard ISO language code (e.g. EN, FR, DE...)", -"config.Language.possible":"Possible values : {0}", -"intro.goal":"Generate OPDS and HTML catalogs from your Calibre ebooks database", -"intro.wiki.title":"The project''s home : ", +"config.Language.description":"此项设置将会改变程序使用的语言 ; 请使用ISO标准语言代码 (例如 EN, FR, DE...)", +"config.Language.possible":"可能的选项 : {0}", +"intro.goal":"从你的 Calibre 数据库生成 OPDS 和 HTML 目录", +"intro.wiki.title":"项目主页 : ", "intro.wiki.url":"http://calibre2opds.com", -"intro.team.title":"The Calibre2Opds team :", +"intro.team.title":"项目人员 :", "intro.team.list1":"David Pierron - main programmer", "intro.team.list2":"Dave Walker - guru, features manager and tester extraordinaire", "intro.team.list3":"Farid Soussi - css and html guru", @@ -124,10 +124,10 @@ "intro.team.list5":"Jane Litte - beta tester and moral support", "intro.thanks.1":"Special thanks to Kb Sriram, who not only programmed Trook, an excellent and OPDS compatible ", "intro.thanks.2":"library manager for the Nook, but also was kind enough to donate a Nook !", -"search.result":"Search result for *{0}*", +"search.result":"*{0}* 的搜索结果", "search.sortorder.asc":"升序", "search.sortorder.desc":"降序", -"permalink.alternate":"Permalink", +"permalink.alternate":"永久链接", "home.alternate":"首页", "search.alternate":"搜索", "sort.alternate":"排序", From 26c1d8f1c409552293b848f6a38c00956336ea3b Mon Sep 17 00:00:00 2001 From: wogong Date: Tue, 7 May 2013 16:30:53 +0800 Subject: [PATCH 8/8] remove debug code --- base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base.php b/base.php index 992fa8b..0205513 100644 --- a/base.php +++ b/base.php @@ -129,7 +129,7 @@ function localize($phrase, $count=-1) { $lang = "en"; if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - //$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); + $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); } $lang_file_en = NULL; $lang_file = 'lang/Localization_' . $lang . '.json';