Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/skeeks-semenov/yii2-multi-language
- Owner: skeeks-semenov
- License: bsd-3-clause
- Created: 2019-04-08T07:05:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T18:30:16.000Z (about 5 years ago)
- Last Synced: 2024-09-29T23:02:28.569Z (about 1 month ago)
- Topics: langs, multilangs, multilanguages, multilingual, yii, yii2, yii2-extension, yii2-lang, yii2-langs, yii2-languages, yii2-multilingual, yii2-request, yii2-urlmanager
- Language: PHP
- Homepage: https://cms.skeeks.com
- Size: 25.4 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Component for multilingual site
================[](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
-----
```phpUrl::to(['/module/controller/action', 'id' => 20, 'lang' => 'en'])
// /en/module/controller/action?id=20```
Screenshot
----------[](https://cms.skeeks.com/uploads/all/f5/fa/f6/f5faf6b3be0dd01e0e368c9280d77e88.png)
[](https://cms.skeeks.com/uploads/all/0c/1c/f5/0c1cf53c64d3e13ff4abeb4208d4c9ea.png)
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)