定制 ademozmermer/transbrowser 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

ademozmermer/transbrowser

Composer 安装命令:

composer require ademozmermer/transbrowser

包简介

Change language by browser for Laravel

README 文档

README

About

The language of your Laravel Project will change according to your browser

Installation

Use the package manager composer to install transbrowser.

composer require ademozmermer/transbrowser

Configuration

You can pull a configuration file into your application by running one of the following artisan command.

php artisan vendor:publish --provider="AdemOzmermer\TransBrowser\TransBrowserServiceProvider"

The language that will be used by default when the browser language cannot be found in the languages ​​you want to use.

// transbrowser.php

'default_lang' => 'en',

The codes of the languages ​​you want to use

// transbrowser.php

'all_langs' => [
        'en',
        'tr',
        'fr',
        'gr',
    ],

Usage

if you want to use it as middleware

Route::middleware('transbrowser')->group(function() {
   //
})

If you want it to be valid everywhere

// Kernel.php
protected $middleware = [
   ...
   \AdemOzmermer\TransBrowser\Middleware\TransBrowserMiddleware::class
];

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固