正如我在木材文档中已经看到了可以添加喜欢this多语言支持:
// Set language to French
putenv('LC_ALL=fr_FR');
setlocale(LC_ALL, 'fr_FR');
// Specify the location of the translation tables
bindtextdomain('myAppPhp', 'includes/locale');
bind_textdomain_codeset('myAppPhp', 'UTF-8');
// Choose domain
textdomain('myAppPhp');
{% trans "Hello World!" %}
{% trans string_var %}
{% trans %}
Hello World!
{% endtrans %}
问题是这样的,我有静态网站 - 将被翻译成法语,但我无法从wp后端添加多语言内容。所以我相信,有一种更好的方式来实现用木材编写的WordPress主题来实现多语言支持。
问题
我想知道什么是建立与木材,实现了其多语言支持一个WordPress主题最好的和最可靠的方法。
有什么最佳实践吗?