<commit_before>Create translations
====================
Createa a `message` folder in your application root folder. 

register the messages component in your config:
```php
'components' => [
    'i18n' => [
        'translations' => [
            'app*' => [
                'class' => 'yii\i18n\PhpMessageSource',
            ],
        ],
    ]
]
```

folder strcuture:
```
messages
	de
		- app.php
	en
		- app.php
```

example content of `messages/de/app.php`
```
return [
    'foo' => 'Ich bin der Deutsche value für "Foo"',
];
```

use:
```php
$i18n = Yii::t('app', 'foo');
```<commit_msg>translation guide with params<commit_after>Create translations
====================
Createa a `message` folder in your application root folder. 

register the messages component in your config:
```php
'components' => [
    'i18n' => [
        'translations' => [
            'app*' => [
                'class' => 'yii\i18n\PhpMessageSource',
            ],
        ],
    ]
]
```

folder strcuture:
```
messages
	de
		- app.php
	en
		- app.php
```

example content of `messages/de/app.php`
```
return [
    'foo' => 'Ich bin der Deutsche value für "Foo"',
];
```

use:
```php
echo Yii::t('app', 'foo');
```

Variables in translations
--------------------------
if you have a parameter to use in the translation
```php
$paramValue = time();

echo Yii::t('app', 'foo-param', $paramValue);
```

the translation inside the messages array must look like:
```php
return [
	'foo-param' => 'Its now {0} in unix timestamp!'
];
```
see: [yii2 messages dok](https://github.com/yiisoft/yii2/blob/master/docs/guide/tutorial-i18n.md)
{'fraction_non_alphanumeric': 0.20446096654275092, 'fraction_numerical': 0.00929368029739777, 'mean_word_length': 2.8089622641509435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6513320', 'n_tokens_mistral': 576, 'n_tokens_neox': 529, 'n_words': 145}