搜索一下,你就知道

< 返回
当前位置:
打印

Polylang 多语言

目录

主要核心插件

Polylang Pro
Polylang for WooCommerce
Hyyan WooCommerce Polylang Integration  分类支持
Theme and plugin translation for Polylang (TTfP) 主题和插件支持,但视乎无效
Lingotek Translation 自动翻译外挂

Polylang 添加自定义字符串,加入functions.php


<?php pll_e('Hello World!'); ?>

add_action('init', function() {
pll_register_string('porto-theme', 'Hello World!');
});


function your_prefix_after_setup_theme() {

// register our translatable strings - again first check if function exists.

if ( function_exists( 'pll_register_string' ) ) {

pll_register_string( 'ToggleNavigation', 'Toggle navigation', 'YourThemeName', false );

pll_register_string( 'ToggleSearch', 'Toggle Search', 'YourThemeName', false );

pll_register_string('404Message', 'It looks like nothing was found. Try getting back to the <a href="%s">home page</a>.', 'YourThemeName', true);

}
}
add_action( 'after_setup_theme', 'your_prefix_after_setup_theme' );

登录

还没有账户?

开始输入你要找的文章。
商店
0 项目 购物车