PHPackages                             adampatterson/laravel-csv-translations - 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. adampatterson/laravel-csv-translations

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

adampatterson/laravel-csv-translations
======================================

Manage translations in CSV files and import them into Laravel.

1.0.0(4mo ago)801[3 PRs](https://github.com/adampatterson/laravel-csv-translations/pulls)MITPHPPHP ^8.4CI passing

Since Feb 17Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/adampatterson/laravel-csv-translations)[ Packagist](https://packagist.org/packages/adampatterson/laravel-csv-translations)[ Docs](https://github.com/adampatterson/laravel-csv-translations)[ GitHub Sponsors]()[ RSS](/packages/adampatterson-laravel-csv-translations/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (13)Versions (7)Used By (0)

Laravel CSV Translations
========================

[](#laravel-csv-translations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3ad31036188456f6558d03412869bb8a694b283a3acb5ba0cf8a57f3beed9a4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6164616d706174746572736f6e2f6c61726176656c2d6373762d7472616e736c6174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adampatterson/laravel-csv-translations)[![GitHub Tests Action Status](https://camo.githubusercontent.com/dd440c5efd4a82e87d0151f6cf83b3a03009c944dbd137ee81bdd668c74e7a70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6164616d706174746572736f6e2f6c61726176656c2d6373762d7472616e736c6174696f6e732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/adampatterson/laravel-csv-translations/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/34e48e510ed9ef53bb331ae11c459ff0bc0d035b9d51f1ec7dafa5a86716a97d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6164616d706174746572736f6e2f6c61726176656c2d6373762d7472616e736c6174696f6e732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/adampatterson/laravel-csv-translations/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0d9d5a8a7535783e0158bf43191fb452a228ecf85a1838d0fb3083c661493fc0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6164616d706174746572736f6e2f6c61726176656c2d6373762d7472616e736c6174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/adampatterson/laravel-csv-translations)

This package allows you to export and import Laravel translations using CSV files. This makes it easy to share translations with non-technical team members or external translation services.

It supports both standard Laravel language files and vendor-published translations, and can handle both PHP array and JSON formats.

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

[](#installation)

You can install the package via composer:

```
composer require adampatterson/laravel-csv-translations
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-csv-translations"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Default Export Path
    |--------------------------------------------------------------------------
    |
    | This is the default path where the translations will be exported to.
    |
    */
    'export_path' => base_path('lang.csv'),
];
```

Usage
-----

[](#usage)

### Publishing Translations

[](#publishing-translations)

By default, the Laravel application skeleton does not include the lang directory. If you would like to customize Laravel's language files, you may publish them via the `lang:publish` Artisan command.

Further, you can also publish translations from any vendor package that has published its translations. To do this, use the `--vendor` (or `-v`) option with the package name:

```
php artisan lang:publish --vendor=vendor/package
```

For example, Filament's translations can be published with:

```
php artisan vendor:publish --tag=filament-translations
```

### Exporting Translations

[](#exporting-translations)

To export your translations to a CSV file, use the `translation:export` command:

```
php artisan translation:export
```

By default, this exports the base locale (defined in `config('app.locale')`) to the path specified in your config.

#### Options

[](#options)

- **Specify Path**: Provide a path as an argument to change the output location. ```
    php artisan translation:export custom/path/translations.csv
    ```
- **Export All Locales**: Use the `--all` (or `-a`) flag to export every locale found in your `lang` directory. ```
    php artisan translation:export --all
    ```
- **Specific Locales**: Use the `--locales` (or `-l`) option with a comma-separated list. ```
    php artisan translation:export --locales=en,fr,es
    ```

The CSV will contain the following columns:

1. **Path**: The relative path to the translation file (e.g., `en/auth` or `vendor/package/en/messages`).
2. **Key**: The dot-notation key for the translation.
3. **Original**: The current translation value.
4. **New**: An empty column for you to provide new translations.

### Importing Translations

[](#importing-translations)

To import translations from a CSV file, use the `translation:import` command:

```
php artisan translation:import
```

The command will read the CSV and update your language files. If a value is present in the **New** column, it will be used; otherwise, the **Original** value is preserved.

#### Options

[](#options-1)

- **Specify Path**: Provide the path to the CSV file as an argument. ```
    php artisan translation:import custom/path/translations.csv
    ```
- **Filter by Locale**: Import only a specific locale from the CSV. ```
    php artisan translation:import --locale=fr
    ```
- **Import as JSON**: Convert the translations into JSON files instead of PHP arrays. ```
    php artisan translation:import --json
    ```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Adam Patterson](https://github.com/adampatterson)
- [All Contributors](https://github.com/adampatterson/laravel-csv-translations/graphs/contributors)

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance81

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.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

Unknown

Total

1

Last Release

136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/042770de9c0c4d404547538b5a64dfe6f6e4400e212e6db042b541e3bef250c4?d=identicon)[adampatterson](/maintainers/adampatterson)

---

Top Contributors

[![adampatterson](https://avatars.githubusercontent.com/u/31537?v=4)](https://github.com/adampatterson "adampatterson (36 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

composer-packagelaravel-packagephplaravelAdam Pattersonlaravel-csv-translations

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/adampatterson-laravel-csv-translations/health.svg)

```
[![Health](https://phpackages.com/badges/adampatterson-laravel-csv-translations/health.svg)](https://phpackages.com/packages/adampatterson-laravel-csv-translations)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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