PHPackages                             anourvalar/laravel-interpreter - 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. anourvalar/laravel-interpreter

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

anourvalar/laravel-interpreter
==============================

Laravel's locales translate through the single (flat) file

2.10.13(1mo ago)05.7kMITPHPPHP ^8.0CI failing

Since Jun 26Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/AnourValar/laravel-interpreter)[ Packagist](https://packagist.org/packages/anourvalar/laravel-interpreter)[ Docs](https://github.com/AnourValar/laravel-interpreter)[ RSS](/packages/anourvalar-laravel-interpreter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (49)Used By (0)

Laravel Interpreter
===================

[](#laravel-interpreter)

- Export all untranslated phrases from your project to a single file for a translator.
- Import all translated phrases from a single file to your project's structure.
- Find &amp; wrap text phrases with missed @lang() directive in your blade templates.

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

[](#installation)

```
composer require anourvalar/laravel-interpreter --dev
```

Usage: basic flow
-----------------

[](#usage-basic-flow)

**Step #1: Create schema (config) for a target locale**

```
php artisan interpreter:schema ru
```

**Step #2: Fill in the config**

```
{
  "source_locale": "en", // reference (source) locale
  "target_locale": "ru",

  "adapter": "AnourValar\\LaravelInterpreter\\Adapters\\JsonAdapter",
  "filename": "ru_i18.json",

  "include_json": true, // include phrases from lang/en.json

  "lang_files": {
    "exclude": [],

    "include": [
      "/admin/" // include all files inside folder lang/en/admin/*
    ],

    "exclude_keys": []
  },

  "view_files": {
    "exclude": [],

    "include": [
      "/admin/" // include all files (parse phrases) inside folder views/admin/*
    ]
  },

  "exclude_phrases": ["ID", "Email", "E-Mail"],
  "include_pattern": null // "white" filter (regexp)
}
```

**Step #3: Export untranslated phrases to a single file for a translator**

```
php artisan interpreter:export ru
```

*This command also display all unwrapped (with missing @lang) phrases.*

**Step #4: Import the completed single file to the project's structure**

```
php artisan interpreter:import ru
```

Usage: wrap
-----------

[](#usage-wrap)

```
php artisan interpreter:wrap resources/views/test.blade.php
```

**Original template**

```
Привет, Мир!
```

**Modified template**

```
@lang('Привет, Мир!')
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity73

Established project with proven stability

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

Recently: every ~96 days

Total

48

Last Release

52d ago

Major Versions

0.1.1 → 1.0.02020-06-29

1.3.0 → 2.0.02020-10-15

PHP version history (4 changes)0.1.0PHP &gt;=7.0.0

2.2.3PHP &gt;=7.1.0

2.7.0PHP &gt;=8.0

2.9.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/db1765d50b04dca380c835746bee50f75be1683fd930f276def046cef17f5d2c?d=identicon)[AnourValar](/maintainers/AnourValar)

---

Top Contributors

[![AnourValar](https://avatars.githubusercontent.com/u/54237693?v=4)](https://github.com/AnourValar "AnourValar (48 commits)")

---

Tags

laravellocalizationtranslateexportanourvalarimportlocalei18trans

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/anourvalar-laravel-interpreter/health.svg)

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

###  Alternatives

[kg-bot/laravel-localization-to-vue

Laravel package used to collect all localization files from resources/lang (and custom) directories and sub-directories and make them available as JSON file

238885.3k5](/packages/kg-bot-laravel-localization-to-vue)[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)[instaclick/translation-editor-bundle

Web editor UI to manage Symfony2 translations (Symfony2 bundle)

2019.5k](/packages/instaclick-translation-editor-bundle)[longman/laravel-multilang

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

5514.4k1](/packages/longman-laravel-multilang)[awes-io/localization-helper

Package for convenient work with Laravel's localization features

3527.1k4](/packages/awes-io-localization-helper)[cariboufute/locale-route

A testable route package with localization for Laravel 5 to 12

206.7k](/packages/cariboufute-locale-route)

PHPackages © 2026

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