futuretek/yii2-language 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

futuretek/yii2-language

最新稳定版本:2.0.0

Composer 安装命令:

composer require futuretek/yii2-language

包简介

Yii2 language support

README 文档

README

Usage

Data

Database will be populated via migration automatically.

Model

Use model futuretek\language\models\Language wherever you want

Language selector

Language selector can be used in any view. Language will be automatically switched in Yii application and saved into cookie.

There are two selectors available:

  • LanguageSelector::dropDown() - display drop-down with all enabled languages
  • LanguageSelector::flagList() - display list of all enabled language flags

Administration

Extension add very simple language list page with activate/deactivate option.

To include the page into your controller you have to add it to actions() method.

class LanguageController extends Controller
{
    public function actions()
    {
        return [
            'index' => 'futuretek\language\IndexAction',
        ];
    }
}

Development

Assets are managed by Compass

  • While developing run compass watch in extension root directory
  • To compile assets for final distribution run compass compile -e production --force in extension root directory

统计信息

  • 总下载量: 10.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-09-15