PHPackages                             aktiweb/laravel-translations-db - 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. aktiweb/laravel-translations-db

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

aktiweb/laravel-translations-db
===============================

A database translations implementation for Laravel 5

0.6.0(9y ago)093GPL2PHPPHP &gt;=5.4.0

Since Jun 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/aktiWeb/laravel-translations-db)[ Packagist](https://packagist.org/packages/aktiweb/laravel-translations-db)[ RSS](/packages/aktiweb-laravel-translations-db/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (17)Used By (0)

Localization from a database
----------------------------

[](#localization-from-a-database)

[![Latest Stable Version](https://camo.githubusercontent.com/6027c6bbadf974c7fb0e561cac6b650b3870ac62deaeea5ab52151d50dc3f160/68747470733a2f2f706f7365722e707567782e6f72672f616b74697765622f6c61726176656c2d7472616e736c6174696f6e732d64622f762f737461626c652e737667)](https://packagist.org/packages/aktiweb/laravel-translations-db)[![License](https://camo.githubusercontent.com/56cbcb7148640a96b38bba7ed14e8a2f764e1dc6835d949aba4cbba395a8084d/68747470733a2f2f706f7365722e707567782e6f72672f616b74697765622f6c61726176656c2d7472616e736c6174696f6e732d64622f6c6963656e73652e737667)](https://packagist.org/packages/aktiweb/laravel-translations-db)[![Total Downloads](https://camo.githubusercontent.com/b9a07506f0215e07c3f5f282dc34a0e56a9e04ce26f6ad278b2ebcac44daadb3/68747470733a2f2f706f7365722e707567782e6f72672f616b74697765622f6c61726176656c2d7472616e736c6174696f6e732d64622f642f746f74616c2e706e67)](https://packagist.org/packages/aktiweb/laravel-translations-db)

This package was created, as an **in-place replacement** for the default TranslationServiceProvider and mend for everyone who got tired of collecting translations in language files and maintaining dozens of arrays, filled with lots and lots of keys. Keys will be added to the database **automatically**, so no more hussling with adding your keys to the translations file. You'll never forget to translate a key anymore! In production your keys will be **cached** to ensure the localization stays fast!

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

[](#installation)

Require this package with composer:

```
composer require aktiweb/laravel-translation-db

```

> Like to live on the edge? Use: `composer require 'aktiweb/laravel-translations-db:*@dev'`

After updating composer, we'll have to replace the TranslationServiceProvider the our ServiceProvider in config/app.php.

Find:

```
'Illuminate\Translation\TranslationServiceProvider',

```

and Replace this with:

```
'Aktiweb\Translation\ServiceProvider',

```

The ServiceProvider will now be loaded. To use this package properly you'll also need the create a table in your database, this can be achieved by publishing the config and migration of this package.

Run the following command:

```
php artisan vendor:publish --provider='Aktiweb\Translation\ServiceProvider'

```

and afterwards run your migrations:

```
php artisan migrate

```

And that's all there is to it!

Usage
-----

[](#usage)

You can just start using translations as you would normaly do with the Laravels default package. The functions `trans()` and `Lang::get()` can be used as you normaly would.

> For more information about Localization and the usage of these functions, please refer to the [Documentation](http://laravel.com/docs/5.1/localization) on the mather.

### Files are still possible

[](#files-are-still-possible)

The usage of translation files is however still possible. Every translation prefixed by a namespace is parsed through the old TranslationServiceProvider. This is needed for external packages that come with there own translation files. But in general you shouldn't be bothered by this.

Importing and exporting
-----------------------

[](#importing-and-exporting)

To ease the proces of migrating to translations in the database, two commands are available since version 0.3.

### Import

[](#import)

To import all translations out of your current language files, you can use the command:

```
php artisan translation:fetch

```

This will import all available translations in language files into the database.

> To import just some specifics you can also make use of the options `--locale` and `--group`.

### Export

[](#export)

To dump the translations from your database back to your filesystem, use:

```
php artisan translation:dump

```

> The options `--locale` and `--group` are also available for this command. **Caution**: all current files will be **overwritten**, so use with care!

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~73 days

Total

16

Last Release

3645d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7749582?v=4)[Dietmar Becker](/maintainers/aktiWeb)[@aktiWeb](https://github.com/aktiWeb)

---

Top Contributors

[![hpolthof](https://avatars.githubusercontent.com/u/1415623?v=4)](https://github.com/hpolthof "hpolthof (24 commits)")

---

Tags

laravellocalizationdatabasetranslation

### Embed Badge

![Health badge](/badges/aktiweb-laravel-translations-db/health.svg)

```
[![Health](https://phpackages.com/badges/aktiweb-laravel-translations-db/health.svg)](https://phpackages.com/packages/aktiweb-laravel-translations-db)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.0M88](/packages/mongodb-laravel-mongodb)[astrotomic/laravel-translatable

A Laravel package for multilingual models

1.4k8.0M135](/packages/astrotomic-laravel-translatable)[hpolthof/laravel-translations-db

A database translations implementation for Laravel 5.

525.8k](/packages/hpolthof-laravel-translations-db)[ntanduy/cloudflare-d1-database

Cloudflare D1 database driver for Laravel — full Eloquent &amp; Query Builder support.

276.8k](/packages/ntanduy-cloudflare-d1-database)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[nevadskiy/laravel-translatable

Add translations to your Eloquent models

2121.9k1](/packages/nevadskiy-laravel-translatable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
