wordpress插件视频教程

wordpress多语言网站制作,polylang 插件介绍

日期:2021-01-29 阅读:6950

下载: https://wordpress.org/plugins/polylang/

安装后,添加语言。设置主语言,是那个星号。 https://polylang.pro/doc/configure-the-languages/

然后添加页面和文章和分类。

菜单管理分配

课程里使用astra主题。

另外讲了pods插件制作产品分类,通过elementor插件来布局。

------------

语言切换:

In appearance->menus, go in screen options on top right of you screen and check the “Language switcher” checkbox. You then should have a new metabox which allows to add a language switcher just as you add another menu item.

-----------

echo pll_current_language();   // -  得到en

echo   get_bloginfo("language");   // -  得到en_US
echo get_locale();   // -  得到en_US

----

https://polylang.wordpress.com/documentation/frequently-asked-questions/the-language-switcher/

可以在模板里制作切换语言:

 <ul><?php pll_the_languages(array('show_flags'=>1,'show_names'=>1));?></ul>

 

---------------

这是dmandwp的配套教程。

dmandwp多语言说明:

define('ENABLEMULTISITE','n'); 设置为y
functions.php加 require  SYSBLOCKROOT . 'prog/prog_langlocale.php';

具体使用看视频讲解。