在wordpress-woocommerce-stripe中设置_区域设置

在wordpress-woocommerce-stripe中设置_区域设置,wordpress,stripe-payments,locale,Wordpress,Stripe Payments,Locale,你好 除了stripe Getway插件外,我的区域设置在任何地方都可以使用(已询问stripe和woocommerce支持:无解决方案) 这里是问题/错误的详细信息 新的信息 今天早上用钩子“wc\u stripe\u localized\u messages”测试 add_filter(“wc_stripe_本地化消息”),函数($arr_def){ $lang=WPTBASE::$theme_var[“lang”]; WPTBASE::init_lang($lang);//此init l

你好

除了stripe Getway插件外,我的区域设置在任何地方都可以使用(已询问stripe和woocommerce支持:无解决方案)

这里是问题/错误的详细信息

新的信息 今天早上用钩子“wc\u stripe\u localized\u messages”测试

add_filter(“wc_stripe_本地化消息”),函数($arr_def){
$lang=WPTBASE::$theme_var[“lang”];
WPTBASE::init_lang($lang);//此init lang和本地
$wp_locale=get_locale();//wp locale val
打印“”;
打印“theme locale=”.WPTBASE::$theme\u var[“local”]。“\n”;
打印“wp locale=”.$wp\u locale.\n”;
打印$lang。“\n”;
打印$arr_def[“无效编号”];
打印“\n”;
打印('卡号不是有效的信用卡号','woocommerce gateway stripe');
打印“”;
返回$arr_def;
});
此输出位于签出页面的顶部 这:

主题区域设置=en_CA

wp locale=en_CA

英格

付款单的数量与有效付款单的数量相同

付款单的数量与有效付款单的数量相同

wordpress区域设置为en_CA 但是输出是法国的吗

救命解决! Wordpress法语区域设置文件为'fr_CA'/canada 条带法语区域设置文件为fr\u fr/france 我正在使用fr_CA。。。。。 详情
这是一个周五的练习

将wp的一般设置语言改为英语,然后又改为法语。现在条纹标签总是用英语吗?这让我相信这是一个卷轴虫。
add_filter("wc_stripe_localized_messages", function($arr_def){
$lang = WPTBASE::$theme_var["lang"];
WPTBASE::init_lang( $lang ); // this init lang and local
$wp_locale = get_locale(); // wp locale val

print "<pre>"; 
print "theme locale = " . WPTBASE::$theme_var["local"] . "\n";
print "wp locale = " . $wp_locale . "\n";

print $lang . "\n";
print  $arr_def["invalid_number"]; 

print "\n";
print __( 'The card number is not a valid credit card number.', 'woocommerce-gateway-stripe' );    

print "</pre>";   
return $arr_def;
});