Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php virtuemart 2更改本机语言_Php_Mysql_Joomla_Virtuemart - Fatal编程技术网

Php virtuemart 2更改本机语言

Php virtuemart 2更改本机语言,php,mysql,joomla,virtuemart,Php,Mysql,Joomla,Virtuemart,[Joomla->2.3.2 Virtuemart 2.1] 大家好,我目前正在开发一个快速的webservice webapp来连接到joomla和virtuemart并插入一个产品 我在多语言方面有困难 我发送一个产品阵列,如下所示: $product['vmlang'] = 'en-GB'; $product['product_name'] = 'Red shirt'; $product['product_descri

[Joomla->2.3.2 Virtuemart 2.1]

大家好,我目前正在开发一个快速的webservice webapp来连接到joomla和virtuemart并插入一个产品

我在多语言方面有困难

我发送一个产品阵列,如下所示:

            $product['vmlang'] = 'en-GB';
            $product['product_name'] = 'Red shirt';
            $product['product_description'] = 'Red shirt very nice';

然后我想用意大利语翻译,所以我改变并通过:

 $product['vmlang'] = 'it-IT';
 $product['product_name'] = 'Maglia Rossa';
 $product['product_description'] = 'Maglia Rossa molto carina';

但它不起作用:它会覆盖表##virtuemart_product_en_gb中的第一个值,而不是在##virtuemart_product_it#中插入新字段

从joomla面板查看工作流,它似乎首先更改了JApplication和virtuemart语言,然后使用新语言执行vmModel('product')->store()

从后端使用->粘贴任务调用VirtueMartController Translate,但它似乎不会更改应用程序语言

哪一个可能是问题

谢谢

我自己回答

你应该把下面的内容改成语言。希望这有帮助

$b= VmConfig::set('vmlang','en_gb');