PHPackages                             symvaro/artisan-lang-utils - 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. symvaro/artisan-lang-utils

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

symvaro/artisan-lang-utils
==========================

v0.1.0(6y ago)116.1k↓45.9%1[1 issues](https://github.com/symvaro/artisan-lang-utils/issues)MITPHPCI failing

Since Nov 17Pushed 9mo ago3 watchersCompare

[ Source](https://github.com/symvaro/artisan-lang-utils)[ Packagist](https://packagist.org/packages/symvaro/artisan-lang-utils)[ RSS](/packages/symvaro-artisan-lang-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

This package contains artisan commands to import/export and work with language resources.

Install
=======

[](#install)

```
composer require --dev symvaro/artisan-lang-utils

```

Use
===

[](#use)

**Warning:** The artisan lang commands will alter the language files when used for editing or import. That means that:

- every content except keys and values will be removed (e.g. comments),
- variables will be replaced with their values and
- nested array structures will be flattened.

Therefore it's recommended to use these tools only in combination with a VCS!

Export/Import
-------------

[](#exportimport)

To export the languages strings in the supported formats use the command like:

```
php artisan lang:export --language=en --format=po filename.po

```

If the filename is omitted, stdout will be used and if no language parameter is specified, the default language will be used. The following formats are currently supported: tsv (default), json, po and resource, where resource is a laravel lang folder. The tsv format contains a tab separated key message pair for every row. The control characters `\n, \t, \\, \r\n` are escaped with `\ `.

The import command line api is similarly structured like the export.

```
php artisan lang:import --language=en --format=po filename

```

It will read from stdin, if no filename is specified. There is also the `--replace-all` option, which will remove language strings, if they are not present in the import file.

Edit
----

[](#edit)

Available commands to ease editing of language strings:

- Add or replace (`lang:add {--l|language=} {?key}`)
- Removing (`lang:remove {?key}`)

Examples
--------

[](#examples)

The commands can be combined with common shell utils. The tsv format is especially supporting this. For example to **list all non unique messages** you can use this:

```
./artisan lang:export \
    | awk -F"\t" '{ print $2 }' \
    | sort | uniq -c | sort -rn \
    | grep -vE "^[ ]*1"
```

Contributing
============

[](#contributing)

This library will only consist of sound tools to import/export and help editing your language files in the command line. Feature requests or contributions out of this scope will not be accepted. Test cases for your special cases or bugs are very appreciated.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance22

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.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 ~122 days

Total

2

Last Release

2242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21fc785ff0025393ea3c12a0af8d901afa92fe9c7e876cc1fbaeb604a2b42431?d=identicon)[apreiml](/maintainers/apreiml)

---

Top Contributors

[![apreiml](https://avatars.githubusercontent.com/u/350183?v=4)](https://github.com/apreiml "apreiml (81 commits)")[![philipkozeny](https://avatars.githubusercontent.com/u/16721635?v=4)](https://github.com/philipkozeny "philipkozeny (4 commits)")

---

Tags

laravellocalizationpo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symvaro-artisan-lang-utils/health.svg)

```
[![Health](https://phpackages.com/badges/symvaro-artisan-lang-utils/health.svg)](https://phpackages.com/packages/symvaro-artisan-lang-utils)
```

###  Alternatives

[mcamara/laravel-localization

Easy localization for Laravel

3.5k9.1M110](/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)[glebsky/laravel-lang-generator

Searches for multilingual phrases in Laravel project and automatically generates language files for you.

2421.3k](/packages/glebsky-laravel-lang-generator)[optimistdigital/nova-locale-manager

Laravel Nova tool to manage locales.

167.0k](/packages/optimistdigital-nova-locale-manager)

PHPackages © 2026

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