瞬间语言环境不起作用-用英语获取值

时间:2018-10-17 10:58:29

标签: javascript momentjs

我正在尝试在函数中设置时刻的语言,例如:

<br />
<b>Notice</b>:  Undefined variable: tmpfname in <b>E:\xampp\htdocs\suppliers\dlwholesale\scrapes\dlwholesaleX.php</b> on line <b>6</b><br />
<br />
<b>Fatal error</b>:  Uncaught PHPExcel_Reader_Exception: Could not open  for reading! File does not exist. in E:\xampp\htdocs\suppliers\dlwholesale\lib\PHPExcel\Reader\Excel2007.php:73
Stack trace:
#0 E:\xampp\htdocs\suppliers\dlwholesale\lib\PHPExcel\IOFactory.php(281): PHPExcel_Reader_Excel2007-&gt;canRead(NULL)
#1 E:\xampp\htdocs\suppliers\dlwholesale\scrapes\dlwholesaleX.php(6): PHPExcel_IOFactory::createReaderForFile(NULL)
#2 {main}
  thrown in <b>E:\xampp\htdocs\suppliers\dlwholesale\lib\PHPExcel\Reader\Excel2007.php</b> on line <b>73</b><br />

我得到了用英语返回的值。

这里是fiddle。 如何在本地设置为其他语言的情况下使用此功能?

1 个答案:

答案 0 :(得分:0)

您拼写错误。应该是moment.locale('nd');

选中here