PHPackages                             hexters/logat - 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. hexters/logat

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

hexters/logat
=============

Extract locale keys from source code in seconds.

1.0.0(1y ago)022MITPHP

Since May 19Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/hexters/logat)[ Packagist](https://packagist.org/packages/hexters/logat)[ Fund](https://www.buymeacoffee.com/hexters)[ GitHub Sponsors](https://github.com/hexters)[ RSS](/packages/hexters-logat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Logat — Laravel Language Extractor
==================================

[](#logat--laravel-language-extractor)

**Logat** is a Laravel package that helps you extract all translation keys from your application’s source code into JSON language files. It scans your Blade and PHP files for `__('...')` calls and compiles the results automatically.

Designed to simplify your localization workflow, especially when managing multi-language projects.

---

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

[](#installation)

Install the package using:

```
composer require hexters/logat --dev
```

> This package is meant for development use only and should not be required in production environments.

---

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

[](#configuration)

If you want to customize the behavior, you can publish the config file:

```
php artisan vendor:publish --provider="Hexters\Logat\LogatServiceProvider"
```

This will publish a file to `config/logat.php` with the following default contents:

```
return [

    'default' => 'id',

    'locales' => ['en', 'ms', 'id', 'ja'],

    'sources' => [
        'resources/views',
        'app',
    ],

];
```

You can adjust the default locale, supported languages, and which folders to scan for translation keys.

---

Usage
-----

[](#usage)

To scan your application and generate/update translation files, run:

```
php artisan logat:collect
```

This command will:

- Search for all `__('...')` keys in the specified source directories
- Merge with any existing translation files
- Save the output in the `lang` directory as individual JSON files for each language

To remove unused keys that no longer exist in your source code, run:

```
php artisan logat:clean
```

This command will:

- Scan your application for active translation keys
- Remove outdated keys from each language file
- Keep your JSON files clean and relevant

---

Output
------

[](#output)

After running the command, you’ll get files like:

```
lang/
├── en.json
├── id.json
├── ja.json
└── ms.json

```

Each file will contain the translation keys found in your app. Any untranslated key will have an empty string as its value.

Example:

```
{
    "Dashboard": "Dashboard",
    "User Account": "User Account"
}
```

You can use AI to change the value of the result generator

---

License
-------

[](#license)

This package is licensed under the [MIT License](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance60

Regular maintenance activity

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

365d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d97e7edbbe58dd16d6f776aec2dacf66c5aeb730b9a4aa3de34ca0c1ebbfb9e?d=identicon)[hexters](/maintainers/hexters)

---

Top Contributors

[![hexters](https://avatars.githubusercontent.com/u/7827420?v=4)](https://github.com/hexters "hexters (12 commits)")

---

Tags

i18njson-translationslanguagelanguage-extractorlaravellaravel-i18nlaravel-translationlocalizationlogattranslationtranslation-keyslaravellocalizationi18nlanguagetranslationlaravel-i18nlaravel-translationlanguage extractortranslation keysjson translationslogat

### Embed Badge

![Health badge](/badges/hexters-logat/health.svg)

```
[![Health](https://phpackages.com/badges/hexters-logat/health.svg)](https://phpackages.com/packages/hexters-logat)
```

###  Alternatives

[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)[longman/laravel-multilang

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

5514.4k1](/packages/longman-laravel-multilang)[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)[zachleigh/laravel-lang-bundler

Create Laravel translations bundles.

2512.5k](/packages/zachleigh-laravel-lang-bundler)

PHPackages © 2026

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