1. Go to this page and download the library: Download devgroup/yii2-polyglot library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
devgroup / yii2-polyglot example snippets
return [
'adminEmail' => '[email protected]',
'supportEmail' => '[email protected]',
'user.passwordResetTokenExpire' => 3600,
/**
* This is a path where your js translation files are stored
* You can use yii2 aliases here(@app, @common, etc.)
*/
'PolyglotTranslationPath' => '@common/polyglot.js'
];
namespace frontend\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
public $sourcePath = '@frontend/assets/dist/';
public $css = [
'styles/main.min.css',
];
public $js = [
'scripts/main.js',
];
public $depends = [
'yii\web\JqueryAsset',
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
'yii\bootstrap\BootstrapPluginAsset',
/// !!! This is a dependency to CurrentTranslation !!!
'DevGroup\Polyglot\CurrentTranslation',
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.