lowercase in the internationalization

Dear all,

Having internationalization in yii is very great. Although, my language is having different way to compose a sentence, I can handle it in yii with ease. For example,




Yii::t('app', '{title} listing', ['title' => $this->title])






'{title} listing' => 'Daftar {title}',



I just need one more help. Say I have "Items listing" and want to translate it to "Daftar item". Using above trick, I can already produce "Daftar Item", but I want to lowercase the "item" to produce "Daftar item". How can I achieve this?

Thanks in advance.

Daniel

perhaps apply strtolower to your title before you pass it to translation function something like




Yii::t('app', '{title} listing', ['title' => strtolower($this->title)])



I also need to be still in uppercase when shown in English…only lowercase when shown in Indonesian.

I am not sure if there is an ICU format available for this but simplest possible solution I can think of


Yii::t('app', '{title} listing', ['title' => $this->title, 'titleLower' => strtolower($this->title)])

and your message could be as following


'{title} listing' => 'Daftar {titleLower}'

Thanks a lot alrazi, it works like a charm.