PHPackages                             hacktivista/laravel-transtojson - 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. hacktivista/laravel-transtojson

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

hacktivista/laravel-transtojson
===============================

Turn Laravel 5 dot.based.translations into JSON-based translations

0.2.1(8y ago)010UnlicensePHP

Since Nov 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Hacktivista/laravel-transtojson)[ Packagist](https://packagist.org/packages/hacktivista/laravel-transtojson)[ RSS](/packages/hacktivista-laravel-transtojson/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel translations to JSON
============================

[](#laravel-translations-to-json)

Turn Laravel 5 dot.based.translations into JSON-based translations

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

[](#installation)

```
composer require hacktivista/laravel-transtojson --dev

```

Usage
-----

[](#usage)

```
php artisan translations:to_json path/to/process/ src_lang [dest_lang] [--debug]

```

E.g.

```
php artisan translations:to_json resources/views/ en es

```

It will:

- Replace all `trans('...')` and `__('...')` translations found in files on `path/to/process/` and subfolders with `__("Textual translation strings")`
- Create a JSON file in `resources/lang/` with textual translation strings \*

\* If JSON file already exists it will merge results with what's already on it. If there's a match with a phrase already matched, contents on the JSON file will prevail.

**THIS WILL OVERWRITE ALL FILES USING \_\_() AND trans() FUNCTIONS IN `path/to/process/` AND SUBDIRECTORIES. BE SURE TO BACKUP FILES PREVIOUS TO RUN THIS COMMAND!**

In order to check results without writing to files run with `--debug` option.

`dest_lang` is optional, if set, the resulting JSON file will have source language strings associated with destination language strings. If not, only source language strings with empty destination strings.

It will NOT delete translations in `resources/lang//`, do it manually when you consider appropriate.

Contributing
------------

[](#contributing)

If you'd like to contribute to this project please read [CONTRIBUTING.md](CONTRIBUTING.md)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

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

Total

3

Last Release

3093d ago

### Community

Maintainers

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

---

Top Contributors

[![3ynm](https://avatars.githubusercontent.com/u/5282749?v=4)](https://github.com/3ynm "3ynm (4 commits)")[![Dylan-DPC](https://avatars.githubusercontent.com/u/99973273?v=4)](https://github.com/Dylan-DPC "Dylan-DPC (1 commits)")

---

Tags

laravellaravel-localization

### Embed Badge

![Health badge](/badges/hacktivista-laravel-transtojson/health.svg)

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

###  Alternatives

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M112](/packages/mcamara-laravel-localization)[typicms/base

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

1.6k20.3k](/packages/typicms-base)[vemcogroup/laravel-translation

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

135304.0k2](/packages/vemcogroup-laravel-translation)

PHPackages © 2026

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