PHPackages                             xdroidteam/translation - 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. [Database &amp; ORM](/categories/database)
4. /
5. xdroidteam/translation

ActiveLibrary[Database &amp; ORM](/categories/database)

xdroidteam/translation
======================

Change standard Laravel file-based translation to DB.

3.0.0(2y ago)22.6k↓100%1MITHTML

Since Oct 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/xdroidteam/translation)[ Packagist](https://packagist.org/packages/xdroidteam/translation)[ RSS](/packages/xdroidteam-translation/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (46)Used By (0)

Laravel DB Translation
======================

[](#laravel-db-translation)

[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](http://choosealicense.com/licenses/mit/)

### Change the standard Laravel file-based translation to DB based.

[](#change-the-standard-laravel-file-based-translation-to-db-based)

### Key features

[](#key-features)

1. Easy GUI for modifying translations
2. The new keys will be **automatically added** to the DB
3. It can easily import **lang** files to the DB
4. Translation is stored in the **cache**, and editing it automatically refreshes the cache from DB. We use cache tags, so regular file or database cache drivers doesn't work, please use **memcached** instead.
5. It is now showing the **missing tranlations** fields for each language and group. Also you can toogle views between "Show only missing translations" and "Show all translations".
6. Now you can **export database** to .CSV. [![Screenshot](https://raw.githubusercontent.com/xdroidteam/images/master/translationUI.png)](https://raw.githubusercontent.com/xdroidteam/images/master/translationUI.png)

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

[](#installation)

### **Below laravel 6.x use version 1.5.x, for Laravel/Lumen 6.x, 7.x use version 2.x**

[](#below-laravel-6x-use-version-15x-for-laravellumen-6x-7x-use-version-2x)

Require this package in your **composer.json** and run composer update:

```
"xdroidteam/translation": "1.5.*"

```

**or run**

```
composer require xdroidteam/translation
```

directly.

After updating composer, add the ServiceProvider to the providers array in \*\*config/app.php\*\* ```php 'XdroidTeam\\Translation\\TranslationServiceProvider', ```
Deploy migration and config file. ```shell php artisan vendor:publish --tag=xdroidteam-translation ``` You need to run the migrations for this package. ```shell php artisan migrate ```
Add following line to your \*\*.env\*\* file: ``` LANGUAGES=en,hu,de ```
Import existing language files to DB: ```shell php artisan translations:import ``` or import with override existing records: ```shell php artisan translations:import --overwrite ```
Routes are added in the ServiceProvider, available at `You can change the route prefix in the deployed config file `config/xdroidteam-translation.php`. Also you can modify the middleware or exclude translation groups (excluded groups will not appear on the GUI). See the example below.

```
