faelzanin/translatelang 问题修复 & 功能扩展

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

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

faelzanin/translatelang

最新稳定版本:1.0.1

Composer 安装命令:

composer require faelzanin/translatelang

包简介

Translate the language files of your project for any language with a simple command.

README 文档

README

Translate your language files from a Laravel 5.1+ project with a simple command.

Installation

TranslateLang must be installed in the root directory of your app, by composer with command:

composer require faelzanin/translatelang

Configuration

After the conclusion of installation process, you must configure the provider of TranslateLang. Open the file config/app.php and add the following line in the array of providers:

Faelzanin\Translatelang\TranslateLangProvider::class

It's all done! After this steps, the Artisan command to translate your files will be available.

Usage

Before running this command, check the existence of a connection to the Internet, because this package uses a Google translator library, to make the translations.

To translate your language files, open the console and run the command:

php artisan translate:lang

After running this command will show the following question:

What is the name of the language file you want to translate?

Enter the name of the language file (example: passwords), you want to translate, and press Enter to go to the next step:

What is the location you want to be translated ? Example : en | es | pt | ru

Here, you must report to which location the file is translated. For example, to Portuguese, inform the location pt

If all goes well, it will be shown a success message.

The language file has been successfully translated.

Also, set the language translated file in the folder below:

<app>\  
    <resources>\
            <lang>\
                <location>\
                    Filename.php

Done, simple and practical!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-10