{"id":318,"date":"2013-06-20T00:49:41","date_gmt":"2013-06-19T16:49:41","guid":{"rendered":"http:\/\/www.ln.la\/?p=318"},"modified":"2013-06-20T00:49:41","modified_gmt":"2013-06-19T16:49:41","slug":"edit-mo-files","status":"publish","type":"post","link":"https:\/\/www.lnlog.cn\/index.php\/2013\/06\/20\/edit-mo-files\/","title":{"rendered":"\u7f16\u8f91mo\u6587\u4ef6\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u8bed\u8a00\u6587\u4ef6\u662f\u4ee5mo\u548cpo\u4e3a\u7ed3\u5c3e\u7684\uff0cpo\u7684\u8bdd\u53ef\u4ee5\u7528EmEditor\u6216\u8005Notepad++\u6253\u5f00\uff0c\u4f46\u662fmo\u7684\u8bdd\uff0c\u56e0\u4e3a\u662fLinux\u7cfb\u7edf\u4e0b\u7684\u6587\u4ef6\uff0c\u6240\u4ee5 \u9700\u8981\u53cd\u7f16\u8bd1\u6210po\u6587\u4ef6\u624d\u80fd\u6253\u5f00\uff0c\u4e0b\u9762\u5c31\u662f\u6765\u8ddf\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b\u76f8\u5173\u7684\u8f6f\u4ef6\u548c\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<div id=\"more\">\n<p><strong>\u4e00\u3001\u5148\u6765\u4ecb\u7ecd\u4e00\u4e0b\u76f8\u5173\u7684\u8f6f\u4ef6\uff1a<\/strong><\/p>\n<p>1.\u7f16\u8bd1\u53cd\u7f16\u8bd1\u8f6f \u4ef6&#8221;gettext&#8221;<\/p>\n<p><a href=\"http:\/\/gnuwin32.sourceforge.net\/packages\/gettext.htm\" target=\"_blank\" rel=\"noopener\">\u4e0b\u8f7d\u5730\u5740<\/a>\u00a0\u00a0 (\u56fd\u5185\u6709\u53ef\u80fd\u88ab\u5899\u4e86\u6253\u4e0d\u5f00\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7406\u6253\u5f00)<\/p>\n<p>2.po \u6587\u4ef6\u7684\u7f16\u8f91\u8f6f\u4ef6&#8221;poedit&#8221;<\/p>\n<p><a href=\"http:\/\/sourceforge.net\/projects\/poedit\/\" target=\"_blank\" rel=\"noopener\">\u4e0b\u8f7d\u5730\u5740<\/a><\/p>\n<p><!--more--><\/p>\n<p><strong>\u4e8c\u3001 \u63a5\u4e0b\u6765\u6765\u8bf4\u8bf4\u4ed6\u4eec\u7684\u4f7f\u7528\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>1.\u4e0b\u8f7d\u597d\u7684&#8221;gettext&#8221;\u662f\u4e00\u4e2a\u5b89\u88c5\u6587\u4ef6\uff0c\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\u662fC:Program FilesGnuWin32\uff0c\u5f53\u4f60\u9700\u8981\u628aD\u76d8\u6839\u76ee\u5f55\u4e0b\u7684default.mo\u53cd\u7f16\u8bd1\u6210default.po\u65f6\uff0c\u4f60\u53ef\u4ee5\u5728\u5f00\u59cb\u83dc\u5355\u7684 \u201c\u8fd0\u884c\u201d\u4e2d\u8f93\u5165&#8221;cmd&#8221;\uff0c\u7136\u540ems-dos\u754c\u9762\u4e0b\u8f93\u5165\u5f15\u53f7\u4e2d\u7684\u5185\u5bb9&#8221;C:Program FilesGnuWin32binmsgunfmt.exe d:default.mo -o d:default.po&#8221;\u5373\u53ef\u5b8c\u6210\u53cd\u7f16\u8bd1\u3002<\/p>\n<p>2.\u7f16\u8bd1\u7684 \u8bdd\u6709\u4e24\u79cd\u529e\u6cd5\uff0c\u7b2c\u4e00\u79cd\u5c31\u662f\u4ecd\u65e7\u4f7f\u7528&#8221;gettext\u201d\u8f6f\u4ef6\uff0c\u8f93\u5165&#8221;C:Program FilesGnuWin32binmsgfmt.exe -o d:default.mod:default.po&#8221;\u5373\u53ef\u5b8c\u6210\u7f16\u8bd1\u5de5\u4f5c\u3002 \u6ce8\uff1a\u7528\u6b64\u65b9\u6cd5\u53cd\u7f16\u8bd1\u540e\u518d\u7f16\u8bd1\u56de\u6765\u7684\u6587\u4ef6\u548c\u6e90\u6587\u4ef6\u662f\u5b8c\u5168\u76f8\u540c\u7684\u3002<\/p>\n<p>\u7b2c \u4e8c\u79cd\u5c31\u662f\u7528&#8221;poedit&#8221;\u8f6f\u4ef6\u6253\u5f00\u4e00\u4e2a\u53cd\u7f16\u8bd1\u540e\u7684po\u6587\u4ef6\uff0c\u7ffb\u8bd1\u540e\u70b9\u9009\u201c\u4fdd\u5b58\u6d88\u606f\u76ee\u5f55\u6587\u6863\u201d\uff0c\u5b83\u5c31\u4f1a\u81ea\u52a8\u751f\u6210\u76f8\u540c\u6587\u4ef6\u540d\u7684.mo\u6587\u4ef6\u3002<\/p>\n<p>\u6ce8\uff1a\u7528\u6b64\u65b9\u6cd5\u751f\u6210mo\u6587\u4ef6\u65f6\u53ef\u80fd\u4f1a\u62a5\u9519\uff0c\u751f\u6210\u7684\u6587\u4ef6\u4f1a\u548c\u539f\u6765\u7684\u6709\u5dee\u5f02\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8bed\u8a00\u6587\u4ef6\u662f\u4ee5mo\u548cpo\u4e3a\u7ed3\u5c3e\u7684\uff0cpo\u7684\u8bdd\u53ef\u4ee5\u7528EmEditor\u6216\u8005Notepad++\u6253\u5f00\uff0c\u4f46\u662fmo\u7684\u8bdd\uff0c\u56e0\u4e3a\u662f &hellip; <a href=\"https:\/\/www.lnlog.cn\/index.php\/2013\/06\/20\/edit-mo-files\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u7f16\u8f91mo\u6587\u4ef6\u7684\u65b9\u6cd5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[59,71,306],"class_list":["post-318","post","type-post","status-publish","format-standard","hentry","category-tech","tag-mo","tag-po","tag-306"],"_links":{"self":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":0,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/posts\/318\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lnlog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}