Zend_Gdata_Calendar_EventEntry 德语答案
我的问题是 Zend_Gdata_Calendar_EventEntry 的所有响应都以德语发送到我的应用程序,我猜是因为它自动采用服务器语言。我想知道如何强制GData的语言?
这是我的应用程序代码的一部分:
//on récupère le nom du service
$this->gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
//on s'authentifie
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $this->gcal);
$client->setConfig(array('language' => 'en'));
//on crée un nouvel objet calendar
$this->gcal = new Zend_Gdata_Calendar($client);
如果我打印 GCal 对象,则语言设置为英语。我不明白为什么谷歌用德语回答!
My problem is that all responses of Zend_Gdata_Calendar_EventEntry are sent to my application in German, I guess because it takes the server language automatically. I would like to know how to force GData's language?
This is a part of my application's code:
//on récupère le nom du service
$this->gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
//on s'authentifie
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $this->gcal);
$client->setConfig(array('language' => 'en'));
//on crée un nouvel objet calendar
$this->gcal = new Zend_Gdata_Calendar($client);
If I print my GCal object, the language is set in English. I don't understand why Google answers in German!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为谷歌可能正在做一些我们在采埃孚也能做的事情:
您的服务器可能将 $_SERVER['HTTP_ACCEPT_LANGUAGE'] 设置为 DE,我知道这不多,但至少您可以检查并可能在应用程序中更改它。
I think Google may be doing something that we can do in ZF:
your server may be setting $_SERVER['HTTP_ACCEPT_LANGUAGE'] to DE, I know it's not much but at least you can check and maybe change it in app.