Download the PHP package devgroup/yii2-multilingual without Composer

On this page you can find all versions of the php package devgroup/yii2-multilingual. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-multilingual

Yii2 multilingual component

Allows building yii2 apps for multiple languages using regional URL's and domains

Build Status codecov.io

Quick start:

WARNING: This extension is under active development.

For support - join DotPlant2 gitter channel.

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Usage

Configure your application

In your web.php config add the following components:

Creating translatable ActiveRecord

As our implementation is based on creocoder/yii2-translatable - the use creation of multilingual ActiveRecords is very similar.

The main differences from creocoder2/yii2translatable:

In your ActiveRecord class(for example Post) add trait and behavior:

HrefLang

Add one line into your HEAD section of layout view:

Tips

  1. Remember to take care of language_id when caching multilingual or translatable content
  2. In requests to excluded routes there may be no language_id, but probably can be cookie_language_id
  3. If you want to generate URL's from console application you may need to configure additional params(see https://github.com/DevGroup-ru/yii2-multilingual-demo/blob/master/config/console.php)
  4. MultilingualTrait adds default conditions to find and is not required for use. But if you don't use it - you must manually configure proper relations.
  5. Add indexes to your translation tables, especially for language_id and model_id pair.

Credits and inspiration sources


All versions of yii2-multilingual with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0.6
yii2tech/filedb Version ^1.0@dev
devgroup/yii2-tag-dependency-helper Version ~1.4.0
kartik-v/yii2-icons Version ~1.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devgroup/yii2-multilingual contains the following files

Loading the files please wait ....