PHPackages                             vemcogroup/laravel-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. [Localization &amp; i18n](/categories/localization)
4. /
5. vemcogroup/laravel-translation

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

vemcogroup/laravel-translation
==============================

Translation package for Laravel to scan for localisations and up/download to poeditor

3.1.1(2mo ago)136327.1k↓41%15[2 issues](https://github.com/vemcogroup/laravel-translation/issues)2MITPHPPHP ^8.3CI failing

Since Sep 2Pushed 2mo ago8 watchersCompare

[ Source](https://github.com/vemcogroup/laravel-translation)[ Packagist](https://packagist.org/packages/vemcogroup/laravel-translation)[ Docs](https://github.com/vemcogroup/laravel-translation)[ RSS](/packages/vemcogroup-laravel-translation/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (10)Versions (33)Used By (2)

Laravel Translation
===================

[](#laravel-translation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3f3dced85a73043cb7b117a949d1a9439254d9c3cee0365a7fe14d96e499be7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656d636f67726f75702f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-translation)[![Total Downloads](https://camo.githubusercontent.com/d3ca8a4e005f4081dbfa5cbf26f2e71d6f86e7b360fc25ef2faf9c170c230120/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656d636f67726f75702f6c61726176656c2d7472616e736c6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vemcogroup/laravel-translation)

Description
-----------

[](#description)

This package allows you to scan your app for translations and create your \*.json file.

It also allows you to upload your base translation to [poeditor](https://www.poeditor.com).

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

[](#installation)

You can install the package via composer:

```
composer require vemcogroup/laravel-translation
```

The package will automatically register its service provider.

To publish the config file to `config/translation.php` run:

```
php artisan vendor:publish --provider="Vemcogroup\Translation\TranslationServiceProvider"
```

This is the default contents of the configuration:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Base Language
    |--------------------------------------------------------------------------
    |
    | Here you may specify which of language is your base language.
    | The base language select will be created as json file when scanning.
    | It will also be the file it reads and uploads to POEditor.
    |
    */

    'base_language' => 'en',

    /*
    |--------------------------------------------------------------------------
    | Functions
    |--------------------------------------------------------------------------
    |
    | Here you define an array describing all the function names to scan files for.
    |
    */

    'functions' => ['__'],

    /*
    |--------------------------------------------------------------------------
    | Excluded directories
    |--------------------------------------------------------------------------
    |
    | Here you define which directories are excluded from scan.
    |
    */

    'excluded_directories' => ['vendor', 'storage', 'public', 'node_modules'],

    /*
    |--------------------------------------------------------------------------
    | Extensions
    |--------------------------------------------------------------------------
    |
    | Here you define an array describing all the file extensions to scan through.
    |
    */

    'extensions' => ['*.php', '*.vue'],

    /*
    |--------------------------------------------------------------------------
    | API Key
    |--------------------------------------------------------------------------
    |
    | Here you define your API Key for POEditor.
    |
    | More info: https://poeditor.com/account/api
    |
    */

    'api_key' => env('POEDITOR_API_KEY'),

    /*
    |--------------------------------------------------------------------------
    | Project Id
    |--------------------------------------------------------------------------
    |
    | Here you define the project Id to upload / download from.
    |
    */

    'project_id' => env('POEDITOR_PROJECT_ID'),
];
```

If you want to use upload / download to poeditor features, you need to create a your base\_language in poeditor.

Usage
-----

[](#usage)

You are now able to use the translation commands scan/upload/download or create-js

**Scan files**

To scan your project for translations run this command:

```
php artisan translation:scan {--merge : Whether the job should overwrite or merge new translations keys}
```

The command creates your `base_language` .json file in `/resources/lang`

The scanner normalizes escaped quotes in string literals, so both `__('yes, I\'m sure')` and `__("yes, I'm sure")` end up as the same JSON key.

**Add terms**

To only add your terms run this command:

```
php artisan translation:add-terms {--scan : Whether the job should scan before uploading}
```

This command doesn't remove unsused terms, so remember *NOT* to run `upload` command afterward.

**Upload translations**

To upload your translation terms to poeditor run this command:

```
php artisan translation:upload {--scan : Whether the job should scan before uploading}
```

You are also able to upload your local translations if you have locale changes

```
php artisan translation:upload {--translations=all : Upload translations for language sv,da,...}
```

**Download translation languages**

To download languages from poeditor run this command:

```
php artisan translation:download {--skip-trimming : Whether translation trimming should be skipped}
```

**Create JS language files**

To create public JS files run this command:

```
php artisan translation:create-js {--download : Download language files before creating js}
```

You are now able to access all your languages as `window.i18n` from `/public/lang` when you include the .js file

```

```

**System translations**

If you want to translate system translations change the terms in eg `/resources/lang/en/auth.php`

From:

```
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
```

To

```
'throttle' => __('Too many login attempts. Please try again in :seconds seconds.'),
```

Then it will be scanned and included in the synced terms.

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance85

Actively maintained with recent releases

Popularity51

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 55% 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 ~80 days

Recently: every ~104 days

Total

31

Last Release

75d ago

Major Versions

1.0.7 → 2.0.02020-03-03

2.1.0 → 3.0.02020-09-09

PHP version history (5 changes)1.0.0PHP ^7.2

3.0.1PHP ^7.3

3.0.3PHP ^7.3|^8.0

3.1.0PHP ^8.2

3.1.1PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/38252305?v=4)[Vemco Group A/S](/maintainers/vemcogroup)[@vemcogroup](https://github.com/vemcogroup)

---

Top Contributors

[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (22 commits)")[![huge10](https://avatars.githubusercontent.com/u/35537393?v=4)](https://github.com/huge10 "huge10 (4 commits)")[![eldor](https://avatars.githubusercontent.com/u/283184?v=4)](https://github.com/eldor "eldor (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (3 commits)")[![grantholle](https://avatars.githubusercontent.com/u/1189456?v=4)](https://github.com/grantholle "grantholle (2 commits)")[![EpocDotFr](https://avatars.githubusercontent.com/u/2053431?v=4)](https://github.com/EpocDotFr "EpocDotFr (2 commits)")[![makije](https://avatars.githubusercontent.com/u/1318142?v=4)](https://github.com/makije "makije (2 commits)")[![NaincyKumariKnoldus](https://avatars.githubusercontent.com/u/87004609?v=4)](https://github.com/NaincyKumariKnoldus "NaincyKumariKnoldus (1 commits)")[![devinfd](https://avatars.githubusercontent.com/u/468399?v=4)](https://github.com/devinfd "devinfd (1 commits)")

---

Tags

laravellaravel-translationpoeditortranslationlaraveli18ntranslationsPoeditor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vemcogroup-laravel-translation/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M988](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)

PHPackages © 2026

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