PHPackages                             tpc/pirates-translator - 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. tpc/pirates-translator

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

tpc/pirates-translator
======================

This package provides hiegh performance danymic localization with lazy loading abilty

1.0.0(3y ago)011MITPHP

Since Aug 25Pushed 3y agoCompare

[ Source](https://github.com/the-pirate-code/translator)[ Packagist](https://packagist.org/packages/tpc/pirates-translator)[ RSS](/packages/tpc-pirates-translator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Pirate Translator
=================

[](#pirate-translator)

The Pirate Translator Package adds fast and dynimic translation funtionalites to your Laravel Application.

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

[](#installation)

### 1. Require the Package

[](#1-require-the-package)

```
composer require tpc/pirates-translator

```

### 2. Add the DB Credentials

[](#2-add-the-db-credentials)

create a new database and add your database credentials to your .env file:

```
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

```

### 3. Run The Installer

[](#3-run-the-installer)

```
php artisan piratetranslator:install

```

Now the installation done.

Usage
-----

[](#usage)

### Adding new locale

[](#adding-new-locale)

```
$locale = 'ckb';
PirateTranslator::addLanguage($locale)

```

### Adding new Translation

[](#adding-new-translation)

```
$newTranslation = [
  'locale' => 'ckb',
  'table_name' => 'user',
  'column_name' => 'name',
  'phrase_key' => 'raman',
  'value' => 'Raman Koye'
];

PirateTranslator::addTranslation($newTranslation);

```

### Update Translation

[](#update-translation)

```
$updateTranslation = [
  'id' => 'ckb', // id is required*.
  'value' => 'Raman Zana' //include other fields/columns that you want to update.
];

PirateTranslator::updateTranslation($updateTranslation);

```

### Bluk Insert

[](#bluk-insert)

```
$blukTranslation = [
  [
    'locale' => 'ckb',
    'table_name' => 'user',
    'column_name' => 'name',
    'phrase_key' => 'raman',
    'value' => 'Raman Koye'
  ],
  [
    'locale' => 'ckb',
    'table_name' => 'user',
    'column_name' => 'name',
    'phrase_key' => 'aram',
    'value' => 'Aram Taher'
  ]
];

PirateTranslator::blukInsert($blukTranslation);

```

### Access

[](#access)

using laravel localization helper function. Key Format `table\_name.phrase\_key.column\_name'

```
\\ table_name = user
\\ phrase_key = raman
\\ column_name = name
\\ value = Raman Zana

__('pirates.user.ahmed.name'); //output: "Raman Zana"

```

### Refreshing Cache

[](#refreshing-cache)

- All locales.

```
piratetranslator:cache

```

- single locale.

```
piratetranslator:cache {locale}

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62885d475e6d6f134b2a75ff002450ed8813192833d64e31051b89a304b5dc94?d=identicon)[RamanZana](/maintainers/RamanZana)

---

Top Contributors

[![RamanZana](https://avatars.githubusercontent.com/u/73228805?v=4)](https://github.com/RamanZana "RamanZana (20 commits)")

---

Tags

laravellocalizationlazy localizationpirates translator

### Embed Badge

![Health badge](/badges/tpc-pirates-translator/health.svg)

```
[![Health](https://phpackages.com/badges/tpc-pirates-translator/health.svg)](https://phpackages.com/packages/tpc-pirates-translator)
```

###  Alternatives

[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[longman/laravel-multilang

Package to integrate multi language (multi locale) functionality in Laravel 5.x

5514.4k1](/packages/longman-laravel-multilang)[zachleigh/laravel-lang-bundler

Create Laravel translations bundles.

2512.5k](/packages/zachleigh-laravel-lang-bundler)

PHPackages © 2026

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