PHPackages                             exorcist-guo/laravel-translate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. exorcist-guo/laravel-translate

ActiveLibrary[Localization &amp; i18n](/categories/localization)

exorcist-guo/laravel-translate
==============================

Package description here.

1.0.9(1y ago)014MITPHPPHP ^7.1 || ^8.0

Since Mar 14Pushed 1y agoCompare

[ Source](https://github.com/exorcist-guo/laravel-translate)[ Packagist](https://packagist.org/packages/exorcist-guo/laravel-translate)[ RSS](/packages/exorcist-guo-laravel-translate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Laravel语言翻译 - 翻译，从未如此简单
=======================

[](#laravel语言翻译---翻译从未如此简单)

[![Latest Stable Version](https://camo.githubusercontent.com/5052a0f41297e35734baad8a0f3c98e6ad2afc19ce3b9f3fbe0afcbf992cd1ce/68747470733a2f2f706f7365722e707567782e6f72672f686f6e6779756b656a692f6c61726176656c2d7472616e736c6174652f762f737461626c65)](https://packagist.org/packages/hongyukeji/laravel-translate)[![Total Downloads](https://camo.githubusercontent.com/082063ddc1df4f94ceae0d9a0d882f3869482a6a06d03d87094cd179c3116b2f/68747470733a2f2f706f7365722e707567782e6f72672f686f6e6779756b656a692f6c61726176656c2d7472616e736c6174652f646f776e6c6f616473)](https://packagist.org/packages/hongyukeji/laravel-translate)[![Latest Unstable Version](https://camo.githubusercontent.com/f64894dfa077599aa3570de409b8612e816970923561ab5cc36742a82cf46816/68747470733a2f2f706f7365722e707567782e6f72672f686f6e6779756b656a692f6c61726176656c2d7472616e736c6174652f762f756e737461626c65)](https://packagist.org/packages/hongyukeji/laravel-translate)[![License](https://camo.githubusercontent.com/04b4d0bca3512a895dad3e2c234c9ab2a2fae489a456b0e93dc806fcc66f538a/68747470733a2f2f706f7365722e707567782e6f72672f686f6e6779756b656a692f6c61726176656c2d7472616e736c6174652f6c6963656e7365)](https://packagist.org/packages/hongyukeji/laravel-translate)

> 全网首款支持所有语言翻译插件，自由扩展，无缝对接。

> 采用鸿宇科技专利[《宏观设计模式》](docs/README.md)开发。

> 更多请点击

特点
--

[](#特点)

- 支持全网络翻译服务商
- 支持自由扩展且易维护

支持
--

[](#支持)

- [百度翻译](http://fanyi-api.baidu.com/api/trans/product/index)
- [有道翻译](https://ai.youdao.com/product-fanyi.s)
- 上述语言翻译服务商比较常用，其他短信如有需要可联系[Shadow](http://wpa.qq.com/msgrd?v=3&uin=1527200768&site=qq&menu=yes)集成
- 如需支持其他语言服务商，可以自行Fork，在`src/Sms.php`中添加对应的语言发送方法即可
- 语言快速集成（参考[《宏观设计模式》](docs/README.md) — 鸿宇科技出品）

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

[](#installation)

This package can be used in Laravel 5.6 or higher and needs PHP 7.2 or higher.

You can install the package via composer:

```
composer require hongyukeji/laravel-translate

composer require --dev hongyukeji/laravel-translate dev-master
```

Config
------

[](#config)

After installation publish the config file:

```
php artisan vendor:publish --provider="Hongyukeji\LaravelTranslate\TranslateServiceProvider"
```

You can specify your source language, the target language(s), the translator and the path to your language files in there.

Translators
-----------

[](#translators)

NameFreeFileDocumentationAvailable languagesGoogle Translate HTTPYesBen182\\AutoTranslate\\Translators\\SimpleGoogleTranslator/Over 100Deepl API v2NoBen182\\AutoTranslate\\Translators\\DeeplTranslator[Documentation](https://www.deepl.com/docs-api.html)EN, DE, FR, ES, PT, IT, NL, PL, RUIf you have lots of translations to make I recommend Deepl. It is fast, reliable and you will not encounter any rate limiting.

Usage
-----

[](#usage)

### Missing translations

[](#missing-translations)

Simply call the artisan missing command for translating all the translations that are set in your source language, but not in your target language:

```
php artisan translate:missing
```

E.g. you have English set as your source language. The source language has translations in auth.php:

```
