Answer the question
In order to leave comments, you need to log in
How to do formatting when translating static text in Yii2?
In code:
In file ru/frontend.phpYii::t('frontend', 'Personal Data')
return[
'Personal Data' => 'Личные данные',
];
'Personal Data' => 'Personal <strong>Data</strong>',
Answer the question
In order to leave comments, you need to log in
the manual says:
You can configure application languages in the application configuration like the following:
return [
// set target language to be Russian
'language' => 'ru-RU',
// set source language to be English
'sourceLanguage' => 'en- US',
......
];
The default value for the source language is en-US, meaning US English.
Or, for example, I do this:
In file: The
question is how correct is this?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question