public static function registerTranslation($prefix, $basePath, array $fileMap)
    {
        if (!isset(Yii::$app->i18n->translations[$prefix])) {
            Yii::$app->i18n->translations[$prefix] = [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => $basePath,
                'fileMap' => $fileMap,
            ];
        }
    }
public static function registerTranslation($prefix, $basePath, array $fileMap)
    {
        if (!isset(Yii::$app->i18n->translations[$prefix])) {
            Yii::$app->i18n->translations[$prefix] = [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => $basePath,
                'fileMap' => $fileMap,
            ];
        }
    }
public static function registerTranslation ( $ prefix , $ basePath , array $ fileMap ) { if ( ! isset ( Yii :: $ app -> i18n -> translations [ $ prefix ] ) ) { Yii :: $ app -> i18n -> translations [ $ prefix ] = [ 'class' => 'yii\i18n\PhpMessageSource' , 'basePath' => $ basePath , 'fileMap' => $ fileMap , ] ; } }
Register a Translation to the i18n component.

In order to register Translations you can register them inside the {{luya\base\Module::onLoad()}} method.

```php
public static function onLoad()
{
$this->registerTranslation('mymodule*', static::staticBasePath() . '/messages', [
'mymodule' => 'mymodule.php',
'mymodule/sub' => 'sub.php',
]);
}
```

@param string $prefix The prefix of which the messages are indicated
@param string $basePath The path to the messages folder where the messages are located.
@param array $fileMap The files mapping inside the messages folder.
Register a Translation to the i18n component .