[英]Symfony2.3 issue with translations
I just try to translate my symfony 2.3 website, but I have an issue that I can not understand. 我只是尝试翻译我的symfony 2.3网站,但是我有一个我无法理解的问题。
Here are my steps: 这是我的步骤:
Now, 60% of my XLIFF is translated in french, And when I try to test the result, symfony does not use my file (in the cache folder I just have catalogue.en.php) 现在,我的XLIFF中有60%是用法语翻译的,当我尝试测试结果时,symfony不使用我的文件(在缓存文件夹中,我只有catalogue.en.php)
I'm working on this for hours and I reaaly don't know why it does not work. 我已经为此工作了好几个小时,而且我不知道为什么它不起作用。
Thank in advance for your help. 预先感谢您的帮助。
Thanks to meteor, I understood why my listener was not working. 多亏了流星,我才明白为什么我的听众无法正常工作。
Here is how I set my local to make it work in all cases: 这是我设置本地语言以使其在所有情况下都可以工作的方式:
$request->attributes->set('_locale', $locale);
$request->getSession()->set('_locale', $locale);
$request->setLocale($locale);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.