Download the PHP package mmelcor/yii2-babelfish without Composer
On this page you can find all versions of the php package mmelcor/yii2-babelfish. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mmelcor/yii2-babelfish
More information about mmelcor/yii2-babelfish
Files in mmelcor/yii2-babelfish
Package yii2-babelfish
Short Description A translation manager for Yii2.
License MIT
Homepage https://github.com/mmelcor/yii2-babelfish
Informations about the package yii2-babelfish
Yii2 Babel Fish
The Yii2 Babelfish symbiote is a portal to edit and update translations.
Key Features
- Uses it's own database for RBAC and user identities that can be shared across multiple instances of babelfish, allowing for easy translator management for several applications in one spot.
- Properly escapes tags and special syntax so the tranlator doesn't need to know how to do so.
- Uses AdminLTE and Redactor for an intuitive user experience
- Intended to be used with Yii2 Advanced Template
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Configuration
Once the extension is installed :
Dependency Configuration
Follow configuration for oorrwullie\yii2-babelfishfood. Once this has been completed continue configuring the remaining dependencies:
Filesystem Configuration
Configure your file system component. This package comes with creocoder\flysystem\AwsS3FileSystem
by default as that is what we use. You may use any of those supported by trntv/yii2-file-kit. Place the following in the common/config/main.php
file, or similar depending on your file system.
for additional information or options checkout creocoder\Flysystem. Feel free to use any of the other file system options they support.
Configure babelFileStorage
place the following also in common/config/main.php
. The file storage step is required to follow the file system set up as it uses the file system as the route for storing the uploaded files. File storage is required to support the uploading of users' avatars, and potential future features.
If you have trouble see trntv/yii2-file-kit documentation.
Module Configuration
-
Create a new database to house babelfish specific RBAC and Users.
-
Add babelfishDb to
common/config/main-local.php
. This component must be namedbabelfishDb
as that is the component the module will be looking for. -
Config Init module by setting up the Module and bootstrapping it in
console/config/main.php
. This module will be used to install database migrations and setup the initial super user for the module. Example setup: - Config babelfish module in
frontend/config/main.php
by placing the following in the modules section:
Run console commands
Once the configuration has been completed next run the following console commands:
-
./yii babelfish-init
This creates the RBAC tables and users table in the babelfish users. -
./yii babelfish-init/load-rbac
This will load the RBAC roles and rules into the database. ./yii babelfish-init/signup
This will create the initial super user for administration.
Add Translation Hooks
Add the following babelfish necessary translation hooks to the common/config/main.php
i18n section:
Implementation
Once this has all been completed you should be able to navigate to yourdomain.com/babel. If everything has been installed and configured correctly you should see the following screen:
All versions of yii2-babelfish with dependencies
oorrwullie/yii2-babelfishfood Version *
mmelcor/yii2-imagehandler Version *
trntv/yii2-file-kit Version ^1.1
dmstr/yii2-adminlte-asset Version 2.*
asofter/yii2-imperavi-redactor Version *
creocoder/yii2-flysystem Version ^0.8.1
league/flysystem-aws-s3-v2 Version ^1.0