PHPackages                             dyanakiev/laravel-translatable-string-exporter - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. dyanakiev/laravel-translatable-string-exporter

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

dyanakiev/laravel-translatable-string-exporter
==============================================

Translatable String Exporter for Laravel

10.0.1(3y ago)022MITPHPPHP &gt;=5.4.0

Since Apr 22Pushed 3y agoCompare

[ Source](https://github.com/dyanakiev/laravel-translatable-string-exporter)[ Packagist](https://packagist.org/packages/dyanakiev/laravel-translatable-string-exporter)[ RSS](/packages/dyanakiev-laravel-translatable-string-exporter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (29)Used By (0)

Translatable String Exporter for Laravel
========================================

[](#translatable-string-exporter-for-laravel)

[![Build Status](https://camo.githubusercontent.com/e2be649ce466e3cef8b1fd6f2f98fc843aff903f145a31e64b1c16050f45fd53/68747470733a2f2f7472617669732d63692e636f6d2f6b6b6f6d656c696e2f6c61726176656c2d7472616e736c617461626c652d737472696e672d6578706f727465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/kkomelin/laravel-translatable-string-exporter)

As we know, Laravel 5.4 has introduced a "new" way of string translation. Now you can use `__('Translate me')` or `@lang('Translate me')` with translations in JSON files to translate strings. Translatable String Exporter is aimed to collect all translatable strings of an application and create corresponding translation files in JSON format to simplify the process of translation.

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

[](#installation)

1. Add kkomelin/laravel-translatable-string-exporter to your project:

```
composer require kkomelin/laravel-translatable-string-exporter
```

2. \[**Laravel &lt; 5.5** only\] Add `ExporterServiceProvider` to the providers array in config/app.php:

```
KKomelin\TranslatableStringExporter\Providers\ExporterServiceProvider::class,
```

Configuration
-------------

[](#configuration)

To change [project defaults](https://github.com/kkomelin/laravel-translatable-string-exporter/wiki/Configuration-and-Project-Defaults), use the following command to create a configuration file in your `config` folder and make necessary changes in there:

```
php artisan vendor:publish --provider="KKomelin\TranslatableStringExporter\Providers\ExporterServiceProvider"
```

Usage
-----

[](#usage)

### Export translatable strings

[](#export-translatable-strings)

```
php artisan translatable:export
```

Where `` is a language code or a comma-separated list of language codes.
For example:

```
php artisan translatable:export es
php artisan translatable:export es,bg,de
```

The command with the "es,bg,de" parameter passed will create es.json, bg.json, de.json files with translatable strings or update the existing files in the `resources/lang` folder of your project.

### Find untranslated strings in a language file (command)

[](#find-untranslated-strings-in-a-language-file-command)

To inspect an existing language file (find untranslated strings), use this command:

```
php artisan translatable:inspect-translations fr
```

Only one language at a time, please.

To export translatable strings for a language and then inspect translations in it, use the following command:

```
php artisan translatable:inspect-translations fr --export-first
```

### Find untranslated strings in a language file (IDE)

[](#find-untranslated-strings-in-a-language-file-ide)

An alternative way to find untranslated strings in your language files is to search for entries with the same string for original and translated. You can do this in most editors using a regular expression.

In PhpStorm, you can use this pattern: `"([^"]*)": "\1"`

### Persistent strings

[](#persistent-strings)

Some strings are not included in the export, because they are being dynamically generated. For example:

`{{ __(sprintf('Dear customer, your order has been %s', $orderStatus)) }}`

Where `$orderStatus` can be 'approved', 'paid', 'cancelled' and so on.

In this case, you can add the strings to the `.json` file manually. For example:

```
  "Dear customer, your order has been approved": "Dear customer, your order has been approved",
  "Dear customer, your order has been paid": "Dear customer, your order has been paid",
  ...

```

In order for those, manually added, strings not to get removed the next time you run the export command, you should add them to a json file named `persistent-strings.json`. For example:

```
[
  "Dear customer, your order has been approved",
  "Dear customer, your order has been paid",
  ...
]

```

License &amp; Copyright
-----------------------

[](#license--copyright)

[MIT](https://github.com/kkomelin/laravel-translatable-string-exporter/blob/master/LICENSE), (c) 2017 Konstantin Komelin

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 82.3% 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 ~86 days

Recently: every ~158 days

Total

26

Last Release

1135d ago

Major Versions

0.5.0 → 1.0.02018-11-25

1.14.0 → 10.0.02022-01-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c4e9d40209ae6425100552bde050e902cd8b17bde040f686e77b3e380047e04?d=identicon)[dyanakiev](/maintainers/dyanakiev)

---

Top Contributors

[![kkomelin](https://avatars.githubusercontent.com/u/755066?v=4)](https://github.com/kkomelin "kkomelin (130 commits)")[![t1sh0o](https://avatars.githubusercontent.com/u/3911728?v=4)](https://github.com/t1sh0o "t1sh0o (11 commits)")[![remcom](https://avatars.githubusercontent.com/u/3468852?v=4)](https://github.com/remcom "remcom (4 commits)")[![dyanakiev](https://avatars.githubusercontent.com/u/11967079?v=4)](https://github.com/dyanakiev "dyanakiev (3 commits)")[![dacoto](https://avatars.githubusercontent.com/u/16915053?v=4)](https://github.com/dacoto "dacoto (2 commits)")[![kohlerdominik](https://avatars.githubusercontent.com/u/18621527?v=4)](https://github.com/kohlerdominik "kohlerdominik (2 commits)")[![mabdelrahman91](https://avatars.githubusercontent.com/u/64133759?v=4)](https://github.com/mabdelrahman91 "mabdelrahman91 (2 commits)")[![tommyschmiedel](https://avatars.githubusercontent.com/u/3260816?v=4)](https://github.com/tommyschmiedel "tommyschmiedel (1 commits)")[![efriandika](https://avatars.githubusercontent.com/u/6255825?v=4)](https://github.com/efriandika "efriandika (1 commits)")[![taoufiqaitali](https://avatars.githubusercontent.com/u/22837086?v=4)](https://github.com/taoufiqaitali "taoufiqaitali (1 commits)")[![Blair2004](https://avatars.githubusercontent.com/u/5265663?v=4)](https://github.com/Blair2004 "Blair2004 (1 commits)")

---

Tags

jsonlaraveltranslationsexportexporter

### Embed Badge

![Health badge](/badges/dyanakiev-laravel-translatable-string-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/dyanakiev-laravel-translatable-string-exporter/health.svg)](https://phpackages.com/packages/dyanakiev-laravel-translatable-string-exporter)
```

###  Alternatives

[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[barryvdh/laravel-translation-manager

Manage Laravel Translations

1.7k3.6M17](/packages/barryvdh-laravel-translation-manager)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[json-mapper/laravel-package

The JsonMapper package for Laravel

25170.4k3](/packages/json-mapper-laravel-package)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[highsolutions/laravel-translation-manager

Manage Laravel Translations

1518.8k](/packages/highsolutions-laravel-translation-manager)

PHPackages © 2026

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