PHPackages                             trinavo/translation-sync - 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. trinavo/translation-sync

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

trinavo/translation-sync
========================

Translation sync package for Laravel applications

1159PHP

Since Sep 18Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/doonfrs/laravel-translation-sync)[ Packagist](https://packagist.org/packages/trinavo/translation-sync)[ RSS](/packages/trinavo-translation-sync/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Translation Sync for Laravel
============================

[](#translation-sync-for-laravel)

A simple Laravel package to extract translation keys used in your app and sync them into one or more language JSON files (e.g., `lang/it.json`).

---

📦 Installation
--------------

[](#-installation)

```
composer require trinavo/translation-sync --dev
```

---

⚙️ Configuration
----------------

[](#️-configuration)

First, publish the package configuration:

```
php artisan vendor:publish --tag=translation-sync-config
```

This will create a config file at:

```
config/translation-sync.php

```

In this file, set the path(s) to your translation JSON files:

```
return [
    'lang_files' => [
        resource_path('lang/it.json'), // laravel < 12
        base_path('lang/ar.json'), // laravel 12+
    ],
];
```

---

🚀 Usage
-------

[](#-usage)

Once you've configured the paths, run the following command:

```
php artisan translations:sync
```

This will:

- Scan your `app/` and `resources/` directories for any usage of:
    - `__('...')`
    - `trans('...')`
    - `@lang('...')`
- Collect all found keys.
- Merge them into the specified language JSON file(s).
- Preserve existing values and sort them alphabetically.

---

📁 Example Output
----------------

[](#-example-output)

If your app contains:

```
__('Welcome');
@lang('Logout');
```

Then `lang/ar.json` will be updated to include:

```
{
    "Logout": "",
    "Welcome": ""
}
```

You can then update the values as needed for translation.

---

---

📝 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

---

Made with ❤️ by Feras AbdAlrahman

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance44

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/trinavo-translation-sync/health.svg)

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

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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