Php 在WordPress插件上翻译月份

Php 在WordPress插件上翻译月份,php,wordpress,plugins,translation,Php,Wordpress,Plugins,Translation,我对php不是很在行,我对插件年龄验证有点问题。它提供法文翻译,但不翻译月份。我检查了代码,发现有2个functions.php: /plugins/age-verify/functions.php /plugins/age-verify/includes/functions.php 在这两种情况下,都存在以下问题: $form .= '<p><select name="av_verify_m" id="av_verify_m">'; foreach ( range( 1

我对php不是很在行,我对插件年龄验证有点问题。它提供法文翻译,但不翻译月份。我检查了代码,发现有2个functions.php: /plugins/age-verify/functions.php /plugins/age-verify/includes/functions.php

在这两种情况下,都存在以下问题:

$form .= '<p><select name="av_verify_m" id="av_verify_m">';
foreach ( range( 1, 12 ) as $month ) :
$month_name = date( 'F', mktime( 0, 0, 0, $month, 1 ) );
$form .= '<option value="' . $month . '">' . $month_name . '</option>';
endforeach;
$form.='';
foreach(范围(1,12)为$month):
$month_name=日期('F',mktime(0,0,0,$month,1));
$form.=''$“月名”;
endforeach;
我试图插入
setlocale(LC_-TIME,'fr_-fr')
$month\u name
行之前,但它不起作用

此外,我还指定插件有一个带有fr_fr.pot的语言文件夹,但在该文件中不翻译月份

如果有人能帮忙&为什么不向我解释如何翻译这些月,那将是非常好的


抱歉我的英语不好…

尝试在.pot文件中添加月份及其翻译,然后检查。是否有其他人帮助我?好的,我找到了解决方案:替换
$form.='';foreach(范围(1,12)为$month):$month_name=date('F',mktime(0,0,0,$month,1))$形式$“月名”;endforeach
by
foreach(范围(1,12)为$month):setlocale(LC_TIME,'fr_fr')$month_name=ucfirst(utf8_编码(strftime('%B',mktime(0,0,0,$month,1)))$形式$“月名”;endforeach尝试在.pot文件中添加月份及其翻译,然后检查。是否有其他人帮助我?好的,因此我找到了解决方案:替换
$form.='';foreach(范围(1,12)为$month):$month_name=date('F',mktime(0,0,0,$month,1))$形式$“月名”;endforeach
by
foreach(范围(1,12)为$month):setlocale(LC_TIME,'fr_fr')$month_name=ucfirst(utf8_编码(strftime('%B',mktime(0,0,0,$month,1)))$形式$“月名”;endforeach
在两个functions.php文件中