In my project in PHP Yii2, I use message formatting. I started with this guide .

As a result, got to the bottom of it, that all this goes through the Intl extension, which in turn uses the ICU and its class MessageFormatter .

Faced a problem. For example, I have a line:

 {gender, select, male{Π£Π²Π°ΠΆΠ°Π΅ΠΌΡ‹ΠΉ} female{УваТаСмая} other{Π£Π²Π°ΠΆΠ°Π΅ΠΌΡ‹ΠΉ}} {name}! 

I pass the parameters to it:

 [ 'gender' => 'female', 'name' => 'Π•ΠΊΠ°Ρ‚Π΅Ρ€ΠΈΠ½Π°', ] 

The original line can be edited by the user. I want it to work and if the line says {NAME} , and if {name} , that is, so that the extension ignores the case of letters, as the PHP function str_ireplace does, for example. I understand that in formatter logic, of course, is more complicated, but nonetheless.

    0