久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔
站長百科 | 數(shù)字化技能提升教程 數(shù)字化時代生存寶典
首頁
數(shù)字化百科
電子書
建站程序
開發(fā)
服務器
辦公軟件
開發(fā)教程
服務器教程
軟件使用教程
運營教程
熱門電子書
WordPress教程
寶塔面板教程
CSS教程
Shopify教程
導航
程序頻道
推廣頻道
網(wǎng)賺頻道
人物頻道
網(wǎng)站程序
網(wǎng)頁制作
云計算
服務器
CMS
論壇
網(wǎng)店
虛擬主機
cPanel
網(wǎng)址導航
WIKI使用導航
WIKI首頁
最新資訊
網(wǎng)站程序
站長人物
頁面分類
使用幫助
編輯測試
創(chuàng)建條目
網(wǎng)站地圖
站長百科導航
站長百科
主機偵探
IDCtalk云說
跨境電商導航
WordPress啦
站長專題
網(wǎng)站推廣
網(wǎng)站程序
網(wǎng)站賺錢
虛擬主機
cPanel
網(wǎng)址導航專題
云計算
微博營銷
虛擬主機管理系統(tǒng)
開放平臺
WIKI程序與應用
美國十大主機
編輯“
WordPress:Files For Direct Translation
”
人物百科
|
營銷百科
|
網(wǎng)賺百科
|
站長工具
|
網(wǎng)站程序
|
域名主機
|
互聯(lián)網(wǎng)公司
|
分類索引
跳轉(zhuǎn)至:
導航
、?
搜索
警告:
您沒有登錄。如果您做出任意編輯,您的IP地址將會公開可見。如果您
登錄
或
創(chuàng)建
一個賬戶,您的編輯將歸屬于您的用戶名,且將享受其他好處。
反垃圾檢查。
不要
加入這個!
== Introduction == == 介紹== Although WordPress displays in U.S. English by default, the software has the built-in capability to be used in any language, or 'localized' (see [[WordPress:WordPress in Your Language]] for more information). The main capability for localization in WordPress uses the Gnu gettext system (see [[WordPress:Translating WordPress]] for more information). In the gettext system, text messages produced by WordPress's PHP files are run through a look-up function, which finds and uses the non-English equivalent of the default English word or phrase in a file. This works well for most of WordPress; however, there are a few components of WordPress that do not lend themselves to localization with gettext. This article explains why that is the case, and also shows how to localize those components of WordPress. 雖然WordPress默認情況下,顯示為美式英語,WordPress本質(zhì)上能在任何語言中使用,或者'本地化'(更多的信息,請看看[[WordPress:WordPress in Your Language|英語外其它語言的WordPress]])。WordPress主要使用Gnu gettext系統(tǒng)實現(xiàn)本地化(更多的信息,請看看[[WordPress:Translating WordPress|翻譯WordPress]])。在gettext系統(tǒng)中,WordPress PHP文件產(chǎn)生的文本信息在look-up函數(shù)中運行,這個函數(shù)使用文件中默認英語單詞和詞組的非英語對等翻譯。對于WordPress的大部分內(nèi)容,gettext能夠很好的操作翻譯內(nèi)容,但是WordPress中的少數(shù)內(nèi)容不能夠使用gettext翻譯。這篇文章解釋了這些內(nèi)容為什么不能夠使用gettext翻譯以及怎樣將WordPress的這些部分本地化。 == Where gettext Doesn't Work == == gettext不能夠操作的內(nèi)容== There are several components of WordPress that cannot or should not be translated or localized with gettext: WordPress中有幾個部分,不能夠由gettext翻譯或者本地化: * The main WordPress README file -- it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. *WordPress主要的自述文件—這是個靜態(tài)的HTML文件,而不是個PHP文件,因此不能夠在gettext函數(shù)中運行。 * A few error messages are generated very early in the WordPress loading cycle, before gettext is loaded. *在WordPress載入時,gettext還沒有載入的時候,產(chǎn)生了一些錯誤信息。 * WordPress includes some JavaScript functionality, which runs on the users' browser (unlike PHP, which runs on the web server), and therefore does not have gettext available. *WordPress包含了一些JavaScript函數(shù),這些函數(shù)在用戶的瀏覽器上運行(與PHP不同,PHP在網(wǎng)絡服務器上運行),因此沒有g(shù)ettext。 == Internationalizing Non-gettext Components == == 將非gettext的組成部分國際化== In order to internationalize or localize components of WordPress that cannot use gettext, you will need to replace the English version of the files with a modified version, where the English text has been replaced by text in your language. A list of the files you will need to translate is below. 為了將WordPress中不能夠使用gettext的部分國際化或者本地化,你需要使用已更改的版本替換英語版本,在以更改的版本,英語文本已經(jīng)替換為你的母語文本。你需要翻譯的文件如下: One note: if you are planning to release your localized files for use by others, be careful about WordPress versions! You will need to keep track of which version of WordPress they correspond to, or release different versions of the files for different versions of WordPress. You can find different versions of WordPress in the [http://wordpress.org/download/release-archive/ Release Archive], or if you want to get down to even more detail, the [http://trac.wordpress.org/browser/ Trac Browser] (a browser for the SVN source-code repository for WordPress). 注意:如果你計劃發(fā)行你的本地化文件供他人使用,注意是哪個版本的WordPress!你需要了解你翻譯的WordPress對應的是哪個版本的WordPress,或者為不同版本的WordPress發(fā)行不同版本的文件。你可以在[http://wordpress.org/download/release-archive/ 版本歸檔]中找到不同版本的WordPress,如果你希望了解更加詳細的信息,[http://trac.wordpress.org/browser/ Trac 瀏覽器](WordPress SVN源代碼庫瀏覽器)。 == List of Files to Translate == == 需要翻譯的文件列表 == === Core files (up to WP 2.5) === === 核心文件 (直到WP 2.5) === * <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated. * <tt>readme.html</tt> -這是個靜態(tài)的HTML文件,而不是PHP文件,因此不能夠在gettext函數(shù)中運行。整個文件都需要翻譯。 * <tt>wp-blog-header.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated. * <tt>wp-blog-header.php</tt> -只有不存在的<tt>wp-config.php</tt>的錯誤,需要翻譯。 * <tt>wp-settings.php</tt> - some <tt>die</tt> commands could happen before the gettext engine is loaded, so they need to be translated. * <tt>wp-settings.php</tt> - 載入gettext引擎之前,會出現(xiàn)一些命令,因此這些命令需要翻譯。 * <tt>wp-config-sample.php</tt> - see below. * <tt>wp-config-sample.php</tt> -請看看下面的。 * <tt>wp-admin/install.php</tt> - only the error for non-existent <tt>wp-config.php</tt> needs to be translated. * <tt>wp-admin/install.php</tt> -只有不存在的<tt>wp-config.php</tt>的錯誤需要翻譯。 * <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated. *<tt>wp-admin/upgrade.php</tt> - only the warning message at the top of the file needs to be translated. * <tt>wp-admin/setup-config.php</tt> -這是自動產(chǎn)生wp-config.php的腳本,而且這個腳本獨立于WordPress之外運行,沒有g(shù)ettext。整個文件都需要翻譯。 *<tt>wp-admin/upgrade.php</tt> -只有文件頂上方出現(xiàn)的警示信息需要翻譯。 *<tt>wp-includes/functions.php</tt> - there's a database error message at the end of the file that needs to be translated. *<tt>wp-includes/functions.php</tt> -文件的結(jié)尾部分出現(xiàn)有數(shù)據(jù)庫錯誤信息,這個信息需要翻譯。 *<tt>wp-includes/wp-db.php</tt> - database error messages need to be translated, because database loading happens early in WordPress loading. *<tt>wp-includes/wp-db.php</tt> -需要翻譯數(shù)據(jù)庫錯誤信息,因為數(shù)據(jù)庫載入發(fā)生在載入WordPress的早期。 === Core files (WP 2.6) === === 核心文件 (WP 2.6) === * <tt>readme.html</tt> - it's a static HTML file, not a PHP file, so it cannot be run through the gettext functions. The whole file needs to be translated. * <tt>readme.html</tt> -是個靜態(tài)的HTML文件,而不是PHP文件,因此不能夠在gettext函數(shù)上運行。整個文件需要翻譯。 * <tt>wp-config-sample.php</tt> - see below. * <tt>wp-config-sample.php</tt> -請看看下面的。 * <tt>wp-admin/setup-config.php</tt> - this is a script for automatic generation of wp-config.php, and as it runs independent of WordPress, there is no gettext. The whole file needs to be translated. * <tt>wp-admin/setup-config.php</tt> -這是自動創(chuàng)建wp-config.php的腳本,因為獨立與WordPress之外運行,沒有g(shù)ettext。整個文件都需要翻譯。 === wp-config-sample.php === === wp-config-sample.php === Translate the instructions in the PHP comments (so that someone who doesn't speak English can figure out how to configure WordPress), and set the WPLANG variable to the correct locale. For example change:<br/><tt>define ('WPLANG', <nowiki>''</nowiki>);</tt><br/>to<br/><tt>define ('WPLANG', 'bg_BG');</tt><br/>if you are using the <tt>bg_BG</tt> locale 翻譯PHP命令中的指示(這樣不說英語的人,能夠了解怎樣配置WordPress),將WPLANG變數(shù)設置為正確的locale。例如更改:<br/><tt>define ('WPLANG', <nowiki>''</nowiki>);</tt><br/>to<br/><tt>定義 ('WPLANG', 'bg_BG');</tt><br/>如果你正使用 <tt>bg_BG</tt> locale。 Replace 'put your unique phrase here' with a similar phrase in your language. Then, in wp-content/languages/<your-locale>.php put: 將'在這里放上你的唯一的詞組'更改為你的母語中對應的詞組。然后,在wp-content/languages/<your-locale>.php中放入: $wp_default_secret_key = '<the-translated-phrase>'; $wp_default_secret_key = '<the-translated-phrase>'; For example, here is what the Bulgarian files look like: 例如,這里是保加利亞語文件的樣式: dist/wp-config-sample.php: <tt> [...]<br /> define('AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> define('SECURE_AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> define('LOGGED_IN_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> [...] </tt> dist/wp-content/languages/bg_BG.php: <tt> <?php<br /> $wp_default_secret_key = 'вашата супер-ултра-уникална фраза сложете тук';<br /> ?><br /> </tt> dist/wp-config-sample.php: <tt> [...]<br /> define('AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> define('SECURE_AUTH_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> define('LOGGED_IN_KEY', 'вашата супер-ултра-уникална фраза сложете тук');<br /> [...] </tt> dist/wp-content/languages/bg_BG.php: <tt> <?php<br /> $wp_default_secret_key = 'вашата супер-ултра-уникална фраза сложете тук';<br /> ?><br /> </tt> === TinyMCE files (up to WP 2.3 only) === === TinyMCE 文件(只直到WP 2.3) === ''Note: From WordPress 2.5 on there is no more need for direct translation of TinyMCE files, since their strings are contained within the main WordPress POT file.'' ''注:從WordPress2.5開始,更需要直接翻譯TinyMCE文件,因為這些字符串包含在WordPress主要的POT文件中。'' TinyMCE is the HTML editor included in WordPress. It is written in JavaScript, and therefore uses a different system for localization. To localize TinyMCE, you will need to do the following: TinyMCE是WordPress中包含的HTML編輯器,使用JavaScript編寫的,因此為本地化使用不同的系統(tǒng)。要本地化TinyMCE,你需要執(zhí)行以下的操作: * <tt>wp-includes/js/tinymce/langs/</tt> - create and add a file named <tt>ll_cc.js</tt>, where <tt>ll</tt> is the lower-case language code for your locale, and <tt>cc</tt> is the lower-case country code. For example, the <tt>bg_BG</tt> locale files should be named <tt>bg_bg.js</tt>. This file should contain the translations of strings in <tt>en.js</tt> (text for buttons and descriptions). * <tt>wp-includes/js/tinymce/langs/</tt> -創(chuàng)建并且添加名稱為<tt>ll_cc.js</tt>的文件,<tt>ll</tt> 是你的locale的小寫字母語言代碼,<tt>cc</tt>是小寫字母國家代碼。例如,<tt>bg_BG</tt>本地化文件應該命名為<tt>bg_bg.js</tt>。這個文件應該在<tt>en.js</tt>中包含了字符串的翻譯(按鈕和描述的文本)。 * Several sub-directories of TinyMCE also have language directories, where you will need to do the same type of translation of their text: *TinyMCE的幾個子目錄也有語言目錄,你需要同樣地翻譯這些文本: **<tt>wp-includes/js/tinymce/plugins/wphelp/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/directionality/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/spellchecker/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/autosave/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/wordpress/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/paste/langs/</tt> **<tt>wp-includes/js/tinymce/langs/</tt> **<tt>wp-includes/js/tinymce/themes/advanced/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/wphelp/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/directionality/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/spellchecker/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/autosave/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/wordpress/langs/</tt> **<tt>wp-includes/js/tinymce/plugins/paste/langs/</tt> **<tt>wp-includes/js/tinymce/langs/</tt> **<tt>wp-includes/js/tinymce/themes/advanced/langs/</tt> **Possibly others, if you have different TinyMCE plugins or themes -- search your TinyMCE directory structure for other <tt>langs</tt> directories. **也許還有其它的,如果你有不同的TinyMCE插件或者主題—為其它的<tt>langs</tt>目錄,搜索你的TinyMCE目錄結(jié)構(gòu)。 === Default theme === ===默認主題 === The Default WordPress theme is entirely in English. All of its files (contained in <tt>wp-content/theme/default</tt>) need to be translated. You may also want to provide other themes for your locale. 默認WordPress主題完全是用英語寫的。所有這些文件(包含在<tt>wp-content/theme/default</tt>中)需要翻譯。你可能也想為你的locale提供其它的主題。 Besides the English-only version of the default theme, a gettext one also exists. It can be found in the [http://svn.automattic.com/wordpress-i18n/theme/ theme folder of the wordpress-i18n svn repository]. 除了英語版本的默認主題之外,還有個gettext版本的。可以在[http://svn.automattic.com/wordpress-i18n/theme/ wordpress-i18n svn 庫主題文件夾]中找到。 === Do not translate === === 不要翻譯 === *<tt>license.txt</tt> - Should be kept in place for legal reasons. A translated version can be added to the archive. *<tt>license.txt</tt> -因為合法性需要存在在WordPress中??梢詫⒎g的版本添加到歸檔上。
摘要:
請注意,您對站長百科的所有貢獻都可能被其他貢獻者編輯,修改或刪除。如果您不希望您的文字被任意修改和再散布,請不要提交。
您同時也要向我們保證您所提交的內(nèi)容是您自己所作,或得自一個不受版權(quán)保護或相似自由的來源(參閱
Wordpress-mediawiki:版權(quán)
的細節(jié))。
未經(jīng)許可,請勿提交受版權(quán)保護的作品!
取消
編輯幫助
(在新窗口中打開)
取自“
http://kktzf.com.cn/wiki/WordPress:Files_For_Direct_Translation
”