Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skeeks-semenov/yii2-multi-language

Component for multilingual site
https://github.com/skeeks-semenov/yii2-multi-language

langs multilangs multilanguages multilingual yii yii2 yii2-extension yii2-lang yii2-langs yii2-languages yii2-multilingual yii2-request yii2-urlmanager

Last synced: about 1 month ago
JSON representation

Component for multilingual site

Awesome Lists containing this project

README

        

Component for multilingual site
================

[SkeekS blog](https://cms.skeeks.com/marketplace/components/tools/401-yii2-komponent-dlya-multiyazychnosti-sajta)

[![Latest Stable Version](https://poser.pugx.org/skeeks/yii2-multi-language/v/stable.png)](https://packagist.org/packages/skeeks/yii2-multi-language)
[![Total Downloads](https://poser.pugx.org/skeeks/yii2-multi-language/downloads.png)](https://packagist.org/packages/skeeks/yii2-multi-language)

Installation
------------

```sh
$ composer require skeeks/yii2-multi-language "^1.0.0"
```

Or add this to your `composer.json` file:

```json
{
"require": {
"skeeks/yii2-multi-language": "^1.0.0"
}
}
```

Use config your application
-----

```php

"bootstrap" => ["multiLanguage"],

"language" => "ru", //Your current application language

"components" => [

"request" => [
"class" => \skeeks\yii2\multiLanguage\MultiLangRequest::class
],

"urlManager" => [
"class" => \skeeks\yii2\multiLanguage\MultiLangUrlManager::class,
'enablePrettyUrl' => true,
'showScriptName' => false,
],

"multiLanguage" => [
"class" => \skeeks\yii2\multiLanguage\MultiLangComponent::class,
'langs' => ['ru', 'en'],
'default_lang' => 'ru', //Language to which no language settings are added.
'lang_param_name' => 'lang',
]

]
```

Example
-----
```php

Url::to(['/module/controller/action', 'id' => 20, 'lang' => 'en'])
// /en/module/controller/action?id=20

```
Screenshot
----------

[SkeekS blog](https://cms.skeeks.com/uploads/all/f5/fa/f6/f5faf6b3be0dd01e0e368c9280d77e88.png)

[SkeekS blog](https://cms.skeeks.com/uploads/all/0c/1c/f5/0c1cf53c64d3e13ff4abeb4208d4c9ea.png)

Video
-----

[Video](https://youtu.be/txWgAnMTwqs)

Links
----------
* [Github](https://github.com/skeeks-semenov/yii2-multi-language)
* [Changelog](https://github.com/skeeks-semenov/yii2-multi-language/blob/master/CHANGELOG.md)
* [Issues](https://github.com/skeeks-semenov/yii2-multi-language/issues)
* [Packagist](https://packagist.org/packages/skeeks/yii2-multi-language)
* [SkeekS blog post](https://cms.skeeks.com/blog/404-kak-v-yii2-proekte-sdelat-multiyazychnye-url)
* [SkeekS marketplace](https://cms.skeeks.com/marketplace/components/tools/401-yii2-komponent-dlya-multiyazychnosti-sajta)

___

> [![skeeks!](https://skeeks.com/img/logo/logo-no-title-80px.png)](https://skeeks.com)
SkeekS CMS (Yii2) — quickly, easily and effectively!
[skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)