內容簡介
這款 WordPress 外掛非常簡單,可以根據任何頁面 URL 的第一部分自動設置 WP 語言環境。
它會自動設置正確的 XML 標記語言屬性和用於加載正確語言文件的內部 WordPress $locale 變量(.po、.mo 的檔案)。
用法:
您的博客 URL 結構應始終以官方的兩位字母語言代碼開始,例如:
/en/… 代表英語
/es/… 代表西班牙語
/ja/… 代表日語
/fr/… 代表法語
等等。
請僅使用小寫代碼。
未遵循此 URL 方案的頁面仍會獲得博客的默認語言設置,該設置在 wp-config.php 檔案中進行配置。
有時您需要重新命名或複製某些 po/mo 檔案,例如,法語語言 PO 檔案通常命名為:fr_FR.po;
只需將其複製到 fr.po 即可使用兩位字母代碼。
範例
這個外掛用於 Post2Peer.com 開放帖子目錄搜尋引擎 的擴展多語言支援。
法語
這個外掛可以輕鬆實現多語言或雙語博客,例如 法語 / 英語。
活動支援
如果您遇到問題、有要求功能或改進的想法,或只是想告訴我如何使用此外掛,請在我的 YD Setup Locale plugin 支援網站 留言。
版本修訂
0.1.0 初始測試版釋出
您喜歡它嗎?
請在 http://www.yann.com/wp-plugins/yd-setup-locale 給我留言。
外掛標籤
開發者團隊
原文外掛簡介
This very simple WordPress plugin automatically sets up the WP language environment based on the first part of the url of any page.
It will automatically setup the right XML header lang attribute + the internal WordPress $locale variable that is used to load the right language files for i18n and l10n (.po, .mo).
Usage:
Your blog URL structure should always begin with an official two-letter langage code, for example:
/en/… for english
/es/… for Spanish
/ja/… for Japanese
/fr/… for French
etc.
Please use only lower-case codes.
Pages that don’t comply to this URL scheme will still get your blog’s default locale setting, as configured in your wp-config.php file.
Sometimes you need to rename or copy some of your po/mo files, for example French language PO files are usually named like this: fr_FR.po;
just copy it to fr.po to make it work with a two-letter code.
Example
This plugin is used for extended multi-language support on the Post2Peer.com open posts directory.
Français
Ce plugin permet très simplement de faire fonctionner un blog multilingue ou bilingue, français/anglais par exemple.
Active support
Drop me a line on my YD Setup Locale plugin support site to report bugs, ask for specific feature or improvement, or just tell me how you’re using the plugin.
Revisions
0.1.0 Initial beta release
Did you like it?
Drop me a line on http://www.yann.com/wp-plugins/yd-setup-locale
