Answer the question
In order to leave comments, you need to log in
How to compare words in Smarty Template?
How to compare Russian text in smarti? Seems like strstr should work... but no...
$payment_method.desc - contains Russian text
There is a code:
{assign "desc" $payment_method.desc}
{assign "var_1" "терминалы."}
{$var_1|@var_dump}
{$desc|@var_dump}
{if $desc|@mb_stristr:$var_1|@var_dump}Да!{/if}
{if $desc|@mb_strstr:$var_1|@var_dump}Да!{/if}
{if $desc|@strstr:$var_1|@var_dump}Да!{/if}
Answer the question
In order to leave comments, you need to log in
You need to check the encoding of both strings: "terminals." in the code and the value of $payment_method.desc.
For the test, you can assign a text constant above $payment_method.desc also in the code.
Everything must be in UTF-8.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question