会发生什么事情是我想要使用的文本自动转换为荷兰语。这是xml的一部分:仔细看看:“事件状态:已确认”
<br>Event Status: confirmed</summary><content type='html'>When: Wed Aug 26, 2015<br />
所以我基本上做的是在php中获取对象并打印对象。问题是文本现在是荷兰语。我不知道为什么。看下面的图像。
if (($response_xml_data = file_get_contents($map_url))===false){
echo "Error fetching XML\n";
} else {
libxml_use_internal_errors(true);
$data = simplexml_load_string($response_xml_data);
print_r($data);
我认为它出错的地方:file_get_contents();有人知道如何获得英语输出吗?
尝试在您的URL请求中添加?hl=en
,从而强制API将其返回到您想要的语言。