Commit 6fc5f0a4 by Alexander Makarov

Minor additions to i18n docs

parent abc0df61
...@@ -39,14 +39,17 @@ Later you can easily change it in runtime: ...@@ -39,14 +39,17 @@ Later you can easily change it in runtime:
Basic message translation Basic message translation
------------------------- -------------------------
### Strings translation Yii basic message translation in its basic variant works without additional PHP extension. What it does is finding a
translation of the message from source language into targer language. Message itself is specified as the first
Yii basic message translation that works without additional PHP extension. `\Yii::t` method parameter:
```php ```php
echo \Yii::t('app', 'This is a string to translate!'); echo \Yii::t('app', 'This is a string to translate!');
``` ```
Yii tries to load approprite translation from one of the message sources defined via `i18n` component configuration.
TBD: https://github.com/yiisoft/yii2/issues/930
### Named placeholders ### Named placeholders
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment