Commit e2b34f2c by Carsten Brandt

updated outdated docs

parent e27c3872
...@@ -459,7 +459,7 @@ class BaseYii ...@@ -459,7 +459,7 @@ class BaseYii
/** /**
* Returns an HTML hyperlink that can be displayed on your Web page showing "Powered by Yii Framework" information. * Returns an HTML hyperlink that can be displayed on your Web page showing "Powered by Yii Framework" information.
* @return string an HTML hyperlink that can be displayed on your Web page showing Powered by Yii" information * @return string an HTML hyperlink that can be displayed on your Web page showing "Powered by Yii Framework" information
*/ */
public static function powered() public static function powered()
{ {
...@@ -473,16 +473,16 @@ class BaseYii ...@@ -473,16 +473,16 @@ class BaseYii
* *
* The translation will be conducted according to the message category and the target language will be used. * The translation will be conducted according to the message category and the target language will be used.
* *
* In case when a translated message has different plural forms (separated by "|"), this method * You can add parameters to a translation message that will be substituted with the corresponding value after
* will also attempt to choose an appropriate one according to a given numeric value which is * translation. The format for this is to use curly brackets around the parameter name as you can see in the following example:
* specified as the first parameter (indexed by 0) in `$params`.
* *
* For example, if a translated message is "I have an apple.|I have {n} apples.", and the first * ```php
* parameter is 2, the message returned will be "I have 2 apples.". Note that the placeholder "{n}" * $username = 'Alexander';
* will be replaced with the given number. * echo \Yii::t('app', 'Hello, {username}!', ['username' => $username]);
* ```
* *
* For more details on how plural rules are applied, please refer to: * Further formatting of message parameters is supported using the [PHP intl extensions](http://www.php.net/manual/en/intro.intl.php)
* <http://www.unicode.org/cldr/charts/supplemental/language_plural_rules.html> * message formatter. See [[yii\i18n\I18N::translate()]] for more details.
* *
* @param string $category the message category. * @param string $category the message category.
* @param string $message the message to be translated. * @param string $message the message to be translated.
......
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