未加载Wordpress语言文件

未加载Wordpress语言文件,wordpress,translation,loading,Wordpress,Translation,Loading,我似乎在将Wordpress语言文件加载到自定义主题中时遇到问题 在functions.php中,我的设置中有以下代码: load_theme_textdomain( 'theme_textdomain', get_template_directory() . '/langs' ); 在我的样式表中,我定义了textdomein: Text Domain: theme_textdomain 在我的主题文件夹中,我有一个文件夹/langs,其中包含两种不同的文件类型: 恩_GB.mo nl_n

我似乎在将Wordpress语言文件加载到自定义主题中时遇到问题

在functions.php中,我的设置中有以下代码:

load_theme_textdomain( 'theme_textdomain', get_template_directory() . '/langs' );
在我的样式表中,我定义了textdomein:

Text Domain: theme_textdomain
在我的主题文件夹中,我有一个文件夹/langs,其中包含两种不同的文件类型:

恩_GB.mo nl_nl.mo

我的主题的默认语言是nl_nl

在我的一个模板中,我使用:

<?= __('Zoeken'); ?>
为了进行测试,我在两个语言文件中都添加了这方面的翻译:


对于en_GB=search,对于nl_nl=zoeken2。但是,nl_nl和en_GB都不是由主题加载的。我做错了什么?

我认为您需要在调用_u_u函数时指定主题域。我认为它不会自动从样式表标题中提取。所以而不是

<?= __('Zoeken'); ?>
试一试


我认为您需要在对_u函数的调用中指定主题域。我认为它不会自动从样式表标题中提取。所以而不是

<?= __('Zoeken'); ?>
试一试

您的wp-config.php中有什么WPLANG值?wp-config.php中有什么WPLANG值?