In Turkish, i
must be written as İ
when in uppercase.
在土耳其,我必须写成İ在大写。
The upper
filter in Twig ouputs I
. Is there a workaround ?
Twig ouput的上部过滤器。有变通方法吗?
My website, built on Symfony 2, has several languages, so this must only be set for the Turkish version.
我的网站,建立在Symfony 2上,有几种语言,所以这只能设置为土耳其版本。
Here is the Twig :
这是树枝:
<h2 class="h1">{{ 'des.iwid.resourcecentre.title'|trans|upper }}</h2>
And my des.iwid.resourcecentre.title
tag is "Bilgi Merkezi
"
和我的des.iwid.resourcecentre。标题标签是"比尔基·默克齐"
The output is "BILGI MERKEZI
" instead of "BİLGI MERKEZİ
"
输出是“比尔基MERKEZI”而不是“BİLGI MERKEZİ”
Thanks !
谢谢!
2 个解决方案
#1
2
OK, my workaround for now is not to use the |upper
filter, but using the text-transform :uppercase;
CSS property which works nicely on this issue.
现在我的解决方案不是使用|上过滤器,而是使用text-transform:大写;CSS属性可以很好地解决这个问题。
#2
1
Extend the Twig: http://twig.sensiolabs.org/doc/advanced.html
延长枝:http://twig.sensiolabs.org/doc/advanced.html
And use this function: http://php.net/manual/en/function.mb-strtoupper.php
并使用此函数:http://php.net/manual/en/function.mb-strtoupper.php。
#1
2
OK, my workaround for now is not to use the |upper
filter, but using the text-transform :uppercase;
CSS property which works nicely on this issue.
现在我的解决方案不是使用|上过滤器,而是使用text-transform:大写;CSS属性可以很好地解决这个问题。
#2
1
Extend the Twig: http://twig.sensiolabs.org/doc/advanced.html
延长枝:http://twig.sensiolabs.org/doc/advanced.html
And use this function: http://php.net/manual/en/function.mb-strtoupper.php
并使用此函数:http://php.net/manual/en/function.mb-strtoupper.php。