{"id":714,"date":"2026-05-13T23:30:48","date_gmt":"2026-05-13T15:30:48","guid":{"rendered":"https:\/\/blog.nanoturtle.cn\/?post_type=thread&#038;p=714"},"modified":"2026-05-13T23:30:48","modified_gmt":"2026-05-13T15:30:48","slug":"why-configure-locale","status":"publish","type":"thread","link":"https:\/\/blog.nanoturtle.cn\/index.php\/thread\/why-configure-locale\/","title":{"rendered":"Arch Linux\u4e3a\u4ec0\u4e48\u8981\u624b\u52a8\u914d\u7f6elocale"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u8bf4\u8d77Arch Linux\uff0c\u5f88\u591a\u521a\u4eceUbuntu\u6216Fedora\u8f6c\u8fc7\u6765\u7684\u7528\u6237\uff0c\u7b2c\u4e00\u53cd\u5e94\u5f80\u5f80\u662f\uff1a\u201c\u600e\u4e48\u8fde\u4e2a\u4e2d\u6587\u754c\u9762\u90fd\u8981\u6211\u81ea\u5df1\u6298\u817e\uff1f\u201d\u5c24\u5176\u662f\u5f53\u4f60\u5728\u7ec8\u7aef\u91cc\u6572\u4e0b<code>locale-gen<\/code>\uff0c\u53d1\u73b0\u7cfb\u7edf\u8fde\u4e2a<code>zh_CN.UTF-8<\/code>\u90fd\u6ca1\u7ed9\u4f60\u9884\u88c5\u65f6\uff0c\u90a3\u79cd\u201c\u6211\u662f\u4e0d\u662f\u88c5\u4e86\u4e2a\u534a\u6210\u54c1\u201d\u7684\u7591\u60d1\u4f1a\u6251\u9762\u800c\u6765\u3002\u4f46\u5982\u679c\u4f60\u7406\u89e3\u4e86Arch\u7684\u8bbe\u8ba1\u54f2\u5b66\uff0c\u5c31\u4f1a\u660e\u767d\u2014\u2014\u8fd9\u6070\u6070\u662f\u5b83\u6700\u786c\u6838\u4e5f\u6700\u6e05\u9192\u7684\u5730\u65b9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48Arch\u4e0d\u66ff\u4f60\u201c\u81ea\u52a8\u201d\u914d\u7f6elocale\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b54\u6848\u85cf\u5728Arch\u7684\u6838\u5fc3\u91cc\uff1a<strong>KISS\u539f\u5219\uff08Keep It Simple, Stupid\uff09<\/strong>\u3002\u8fd9\u91cc\u7684\u201c\u7b80\u5355\u201d\u4e0d\u662f\u6307\u7528\u6237\u64cd\u4f5c\u7b80\u5355\uff0c\u800c\u662f\u6307\u7cfb\u7edf\u5185\u90e8\u903b\u8f91\u7b80\u5355\u3001\u65e0\u5197\u4f59\u3001\u65e0\u9690\u542b\u5047\u8bbe\u3002\u7edd\u5927\u591a\u6570\u53d1\u884c\u7248\u4f1a\u5728\u5b89\u88c5\u65f6\u6839\u636e\u4f60\u9009\u62e9\u7684\u8bed\u8a00\u533a\u57df\uff0c\u81ea\u52a8\u751f\u6210\u4e00\u5927\u5806locale\uff08\u6bd4\u5982<code>en_US.UTF-8<\/code>\u3001<code>zh_CN.UTF-8<\/code>\u3001<code>de_DE.UTF-8<\/code>\u7b49\u7b49\uff09\uff0c\u7136\u540e\u5199\u8fdb<code>\/etc\/locale.conf<\/code>\u3002\u4f46Arch\u8ba4\u4e3a\uff0c<strong>\u4f60\u4e0d\u5e94\u8be5\u66ff\u7528\u6237\u505a\u51b3\u5b9a<\/strong>\u2014\u2014\u54ea\u6015\u8fd9\u4e2a\u51b3\u5b9a\u770b\u8d77\u6765\u518d\u5408\u7406\u3002\u7528\u6237\u53ef\u80fd\u53ea\u9700\u8981<code>en_US.UTF-8<\/code>\uff0c\u5374\u56e0\u4e3a\u81ea\u52a8\u751f\u6210\u800c\u591a\u51fa\u51e0\u5341\u4e2a\u7528\u4e0d\u5230\u7684locale\u6587\u4ef6\uff0c\u5360\u7528\u78c1\u76d8\u7a7a\u95f4\u3001\u589e\u52a0<code>locale-gen<\/code>\u7684\u7f16\u8bd1\u65f6\u95f4\u3002\u66f4\u5173\u952e\u7684\u662f\uff0c\u81ea\u52a8\u914d\u7f6e\u4f1a\u63a9\u76d6\u5e95\u5c42\u673a\u5236\uff1a\u7528\u6237\u6c38\u8fdc\u4e0d\u77e5\u9053<code>locale-gen<\/code>\u5230\u5e95\u5e72\u4e86\u4ec0\u4e48\uff0c\u4e5f\u4e0d\u77e5\u9053<code>\/etc\/locale.gen<\/code>\u91cc\u90a3\u4e9b\u6ce8\u91ca\u6389\u7684\u6761\u76ee\u610f\u5473\u7740\u4ec0\u4e48\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">locale\u5230\u5e95\u5728\u7ba1\u4ec0\u4e48\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f88\u591a\u4eba\u4ee5\u4e3alocale\u53ea\u662f\u201c\u8bed\u8a00\u201d\uff0c\u5176\u5b9e\u5b83\u63a7\u5236\u7740<strong>\u5b57\u7b26\u7f16\u7801\u3001\u6392\u5e8f\u89c4\u5219\u3001\u65e5\u671f\u683c\u5f0f\u3001\u8d27\u5e01\u7b26\u53f7\u3001\u5c0f\u6570\u70b9\u5206\u9694\u7b26<\/strong>\u7b49\u4e00\u7cfb\u5217\u533a\u57df\u654f\u611f\u884c\u4e3a\u3002\u6bd4\u5982\uff0c<code>zh_CN.UTF-8<\/code>\u4e0d\u4ec5\u8ba9\u7cfb\u7edf\u663e\u793a\u4e2d\u6587\uff0c\u8fd8\u8ba9<code>sort<\/code>\u547d\u4ee4\u6309\u62fc\u97f3\u6392\u5e8f\uff0c\u8ba9<code>date<\/code>\u8f93\u51fa\u201c2025\u5e743\u670820\u65e5\u201d\u3002\u800c<code>en_US.UTF-8<\/code>\u5219\u7528\u82f1\u6587\u6708\u540d\u3001\u7f8e\u5143\u7b26\u53f7\u3002\u5982\u679c\u4f60\u540c\u65f6\u9700\u8981\u5904\u7406\u82f1\u6587\u6587\u6863\u548c\u4e2d\u6587\u6587\u6863\uff0c\u53ef\u80fd\u5f97\u5728\u540c\u4e00\u4e2a\u7cfb\u7edf\u91cc\u542f\u7528\u591a\u4e2alocale\u3002Arch\u8ba9\u4f60\u624b\u52a8\u7f16\u8f91<code>\/etc\/locale.gen<\/code>\uff0c\u7136\u540e\u8fd0\u884c<code>locale-gen<\/code>\uff0c\u672c\u8d28\u4e0a\u662f\u5728\u903c\u4f60<strong>\u660e\u786e\u77e5\u9053\u81ea\u5df1\u9700\u8981\u54ea\u4e9b\u533a\u57df<\/strong>\uff0c\u800c\u4e0d\u662f\u88ab\u52a8\u63a5\u53d7\u4e00\u4e2a\u201c\u4e07\u80fd\u201d\u7684\u9884\u8bbe\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u52a8\u914d\u7f6e\u5e26\u6765\u7684\u597d\u5904<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>\u7cbe\u786e\u63a7\u5236<\/strong>\uff1a\u4f60\u53ea\u751f\u6210\u771f\u6b63\u9700\u8981\u7684locale\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u7cfb\u7edf\u5f00\u9500\u3002\u6bd4\u5982\u4e00\u4e2a\u53ea\u505a\u670d\u52a1\u5668\u8fd0\u7ef4\u7684Arch\u7528\u6237\uff0c\u53ef\u80fd\u53ea\u9700\u8981<code>en_US.UTF-8<\/code>\uff0c\u800c\u4e00\u4e2a\u4e2d\u6587\u684c\u9762\u7528\u6237\u5219\u9700\u8981<code>zh_CN.UTF-8<\/code>\u3002Arch\u4e0d\u4f1a\u81ea\u4f5c\u4e3b\u5f20\u7ed9\u4f60\u585e\u8fdb<code>ja_JP.UTF-8<\/code>\u3002<\/li>\n\n\n<li><strong>\u5b66\u4e60\u4ef7\u503c<\/strong>\uff1a\u5f53\u4f60\u624b\u52a8\u53bb\u6ce8\u91ca\u6389<code>#zh_CN.UTF-8<\/code>\u524d\u9762\u7684<code>#<\/code>\u65f6\uff0c\u4f60\u4f1a\u610f\u8bc6\u5230\u201c\u54e6\uff0c\u539f\u6765locale\u662f\u901a\u8fc7glibc\u7684<code>locale-gen<\/code>\u5de5\u5177\u4ece\u6a21\u677f\u6587\u4ef6\u751f\u6210\u7684\u201d\u3002\u8fd9\u79cd\u201c\u88ab\u8feb\u7406\u89e3\u201d\u7684\u8fc7\u7a0b\uff0c\u6070\u6070\u662fArch\u793e\u533a\u63a8\u5d07\u7684\u201c\u4ece\u6839\u6e90\u4e0a\u638c\u63e1\u7cfb\u7edf\u201d\u7684\u4f53\u73b0\u3002<\/li>\n\n\n<li><strong>\u907f\u514d\u51b2\u7a81<\/strong>\uff1a\u67d0\u4e9b\u8f6f\u4ef6\uff08\u6bd4\u5982Firefox\u3001LibreOffice\uff09\u4f1a\u8bfb\u53d6<code>LANG<\/code>\u73af\u5883\u53d8\u91cf\u6765\u51b3\u5b9a\u754c\u9762\u8bed\u8a00\u3002\u5982\u679c\u4f60\u4e0d\u5c0f\u5fc3\u8bbe\u7f6e\u4e86\u591a\u4e2alocale\uff0c\u6216\u8005\u987a\u5e8f\u4e0d\u5bf9\uff0c\u53ef\u80fd\u51fa\u73b0\u82f1\u6587\u754c\u9762\u5374\u663e\u793a\u4e2d\u6587\u4e71\u7801\u7684\u602a\u4e8b\u3002\u624b\u52a8\u914d\u7f6e\u8ba9\u4f60\u80fd\u4e00\u6761\u6761\u6392\u67e5\uff0c\u800c\u4e0d\u662f\u88ab\u81ea\u52a8\u751f\u6210\u7684\u6df7\u4e71\u914d\u7f6e\u7275\u7740\u9f3b\u5b50\u8d70\u3002<\/li>\n\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e0d\u8fc7\uff0c\u624b\u52a8\u914d\u7f6e\u4e5f\u6709\u4ee3\u4ef7<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u8981\u6c42\u7528\u6237\u81f3\u5c11\u4e86\u89e3<code>locale.gen<\/code>\u3001<code>locale.conf<\/code>\u3001<code>locale -a<\/code>\u8fd9\u4e9b\u57fa\u672c\u547d\u4ee4\u3002\u5bf9\u4e8e\u65b0\u624b\u6765\u8bf4\uff0c\u7b2c\u4e00\u6b21\u914d\u7f6e\u65f6\u53ef\u80fd\u8fde<code>vim<\/code>\u600e\u4e48\u9000\u51fa\u90fd\u4e0d\u77e5\u9053\u3002\u4f46Arch\u793e\u533a\u6587\u6863\uff08Arch Wiki\uff09\u5199\u5f97\u6781\u5176\u8be6\u5c3d\uff0c\u4f60\u751a\u81f3\u80fd\u627e\u5230\u201c\u5982\u4f55\u914d\u7f6e\u4e2d\u6587locale\u201d\u7684\u4e13\u95e8\u9875\u9762\uff0c\u4e00\u6b65\u6b65\u6559\u4f60\u600e\u4e48\u5b89\u88c5\u4e2d\u6587\u5b57\u4f53\u3001\u914d\u7f6e\u8f93\u5165\u6cd5\u3002\u8fd9\u79cd\u201c\u6587\u6863\u9a71\u52a8\u201d\u7684\u6a21\u5f0f\uff0c\u672c\u8d28\u4e0a\u662f\u628a\u201c\u624b\u52a8\u914d\u7f6e\u201d\u7684\u75db\u70b9\u8f6c\u5316\u6210\u4e86\u5b66\u4e60\u673a\u4f1a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bf4\u5230\u5e95\uff0cArch Linux\u7684\u624b\u52a8locale\u914d\u7f6e\u4e0d\u662f\u8bbe\u8ba1\u7f3a\u9677\uff0c\u800c\u662f\u4e00\u79cd<strong>\u6e05\u9192\u7684\u9009\u62e9<\/strong>\u3002\u5b83\u7528\u6700\u76f4\u767d\u7684\u65b9\u5f0f\u544a\u8bc9\u4f60\uff1a\u8fd9\u4e2a\u7cfb\u7edf\u4e0d\u4f1a\u66ff\u4f60\u601d\u8003\uff0c\u4f46\u53ea\u8981\u4f60\u613f\u610f\u82b1\u5341\u5206\u949f\u7406\u89e3\u5b83\uff0c\u5b83\u5c31\u80fd\u7ed9\u4f60\u4e00\u53f0\u5b8c\u5168\u7531\u4f60\u638c\u63a7\u7684\u673a\u5668\u3002\u800c\u5f53\u4f60\u6572\u4e0b<code>locale-gen<\/code>\uff0c\u770b\u5230\u7ec8\u7aef\u91cc\u4e00\u884c\u884c\u751f\u6210\u6210\u529f\u7684\u6d88\u606f\u65f6\uff0c\u90a3\u79cd\u201c\u662f\u6211\u4eb2\u624b\u628a\u5b83\u53d8\u6210\u4e2d\u6587\u201d\u7684\u638c\u63a7\u611f\uff0c\u8fdc\u6bd4\u4e00\u4e2a\u81ea\u52a8\u914d\u7f6e\u597d\u7684\u7cfb\u7edf\u6765\u5f97\u8e0f\u5b9e\u3002<\/p>\n","protected":false},"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","class_list":["post-714","thread","type-thread","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.nanoturtle.cn\/index.php\/wp-json\/wp\/v2\/thread\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nanoturtle.cn\/index.php\/wp-json\/wp\/v2\/thread"}],"about":[{"href":"https:\/\/blog.nanoturtle.cn\/index.php\/wp-json\/wp\/v2\/types\/thread"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nanoturtle.cn\/index.php\/wp-json\/wp\/v2\/comments?post=714"}],"wp:attachment":[{"href":"https:\/\/blog.nanoturtle.cn\/index.php\/wp-json\/wp\/v2\/media?parent=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}