feat:提供i18n支持

This commit is contained in:
sunxiyuan 2020-07-19 17:28:42 +08:00
parent f10986e350
commit 45e77a673a
117 changed files with 2455 additions and 550 deletions

View file

@ -5,11 +5,25 @@
* Author: WP中国本土化社区
* Author URI:https://wp-china-yes.org/
* Version: 3.0.0-Beta
* Text Domain: wp-china-yes
* Domain Path: /languages
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
if (is_admin()) {
/**
* 加载翻译
*/
add_action('plugins_loaded', function () {
load_plugin_textdomain(
'wp-china-yes',
false,
basename(dirname(__FILE__)).'/languages/'
);
});
/**
* WP-China-Yes的翻译校准基于Loco Translate插件开发这里通过引入入口文件的方式激活该插件的二次开发版
*/
@ -17,6 +31,7 @@ if (is_admin()) {
require __DIR__ . '/libs/loco-translate/loco.php';
}
/**
* 引入设置页
*/