added italian translation

try bootstrapping approach
updated composer.json
This commit is contained in:
Simon Karlen 2022-01-06 07:35:27 +01:00
parent 08b4af53d2
commit 58d28c0bc4
No known key found for this signature in database
GPG Key ID: 0630C27D666EBCC3
4 changed files with 35 additions and 7 deletions

View File

@ -55,7 +55,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
"dev-master": "2.0.x-dev"
},
"bootstrap": "yii\\bootstrap5\\i18n\\TranslationBootstrap"
}
}

View File

@ -0,0 +1,27 @@
<?php
/**
* @package yii2-bootstrap5
* @author Simon Karlen <simi.albi@gmail.com>
*/
namespace yii\bootstrap5\i18n;
use yii\base\Application;
/**
* This bootstrap implementation is used to add translations automatically to app configuration
*/
class TranslationBootstrap implements \yii\base\BootstrapInterface
{
/**
* {@inheritDoc}
*/
public function bootstrap($app)
{
$app->i18n->translations['yii/bootstrap5*'] = [
'class' => '\yii\i18n\GettextMessageSource',
'sourceLanguage' => 'en-US',
'basePath' => '@yii/bootstrap5/messages'
];
}
}

Binary file not shown.

View File

@ -12,21 +12,21 @@ msgstr ""
msgctxt "yii/bootstrap5"
msgid "Button"
msgstr ""
msgstr "Bottone"
msgctxt "yii/bootstrap5"
msgid "Close"
msgstr ""
msgstr "Chiudi"
msgctxt "yii/bootstrap5"
msgid "Home"
msgstr ""
msgstr "Partenza"
msgctxt "yii/bootstrap5"
msgid "Show"
msgstr ""
msgstr "Indicare"
msgctxt "yii/bootstrap5"
msgid "Toggle Dropdown"
msgstr ""
msgstr "Attiva/Disattiva lista a tendina"