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

ActiveLibrary

coderscantina/laravel-translations
==================================

Database driven translation for your Laravel application.

v1.1.0(1y ago)06.6k↓100%1MITPHPPHP ^8.0

Since Jul 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/coderscantina/laravel-translations)[ Packagist](https://packagist.org/packages/coderscantina/laravel-translations)[ RSS](/packages/coderscantina-laravel-translations/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (7)Used By (1)

Laravel Database Translation from Coder's Cantina
=================================================

[](#laravel-database-translation-from-coders-cantina)

A powerful, database-driven translation system for Laravel applications. Store, manage, and retrieve translations directly from your database, with full integration with Laravel's built-in translation system.

Features
--------

[](#features)

- **Database Storage**: Store all translations in your database for easy management
- **Laravel Integration**: Seamlessly integrates with Laravel's built-in translation system
- **Placeholder Support**: Full support for placeholders in translations
- **Fallback Support**: Cascading language fallbacks
- **Import/Export**: Import and export translations from/to JSON files
- **Command Line Tools**: Comprehensive set of Artisan commands to manage translations

Getting started
---------------

[](#getting-started)

- Install this package

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

[](#installation)

### Requirements

[](#requirements)

- PHP 8.0 or higher
- Laravel 8.0 or higher

### Via Composer

[](#via-composer)

```
composer require coderscantina/translations
```

The package will automatically register its service provider.

### Publish Configuration

[](#publish-configuration)

Optionally publish the configuration file:

```
php artisan vendor:publish --provider="CodersCantina\Translations\ServiceProvider" --tag="config"
```

### Run Migrations

[](#run-migrations)

Create the translations table:

```
php artisan migrate
```

Usage
-----

[](#usage)

### Adding Translations

[](#adding-translations)

#### Via Artisan Command

[](#via-artisan-command)

```
# Basic usage
php artisan translations:add welcome.message 'Welcome to our application'

# With language option
php artisan translations:add welcome.message 'Willkommen in unserer Anwendung' --lang=de

# With namespace
php artisan translations:add welcome.message 'Welcome to our application' --namespace=frontend
```

#### Via Code

[](#via-code)

```
use CodersCantina\Translations\Translation;

Translation::create([
    'key' => 'welcome.message',
    'value' => 'Welcome to our application',
    'language_iso' => 'en'
]);
```

### Retrieving Translations

[](#retrieving-translations)

Use Laravel's built-in methods for retrieving translations, such as `Lang::get()`, `__` and `trans` helpers.

```
// Using the __ helper
echo __('welcome.message'); // 'Welcome to our application'

// With replacements
echo __('welcome.user', ['name' => 'John']); // 'Welcome, John'

// Specifying language
echo __('welcome.message', [], 'de'); // 'Willkommen in unserer Anwendung'

// Using the trans helper
echo trans('welcome.message');

// Using the facade
use Illuminate\Support\Facades\Lang;
echo Lang::get('welcome.message');
```

### Organizing Translations

[](#organizing-translations)

We strongly recommend using dot notation to logically group translations:

```
auth.login.title
auth.login.email
auth.login.password
auth.register.title
errors.validation.required
errors.server.unavailable

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance45

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~119 days

Recently: every ~111 days

Total

6

Last Release

428d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/605b58449a3fff7658eba249cf6cad34ed7a577f7d72f673c1b858ce3a97f311?d=identicon)[badmike](/maintainers/badmike)

---

Top Contributors

[![badmike](https://avatars.githubusercontent.com/u/1019002?v=4)](https://github.com/badmike "badmike (7 commits)")

---

Tags

laraveltranslations

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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