New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ufirst/lang-import-export

A Laravel package providing artisan commands to import and export language files from and to CSV.
238,661 41

Larablocks Analysis

ufirst/lang-import-export works with Laravel 8, 9 and 10 (latest release 8.1.1, Apr 24, 2024), all past end of life (the last on Feb 4, 2025): no more fixes, even for security.

Laravel 4 to 7 in earlier releases.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 8, 9 and 10, past end of life since Feb 4, 2025
  • No release in the last 12 months (last: Apr 24, 2024)
  • 766 downloads a month (needs 10,000)
  • 41 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Apr 24, 2024.
  • No releases in the last 12 months.
  • First released: Jul 25, 2014.
  • Monthly downloads: 766, down 88% from six months ago.
  • 7 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require ufirst/lang-import-export
Latest Version:8.1.1
PHP:>=7.3
Laravel:8 · 9 · 10
Older releases:4 – 7
License:MIT
Last Updated:Apr 24, 2024
Links: GitHub  ·  Packagist
Maintainer: mruoss

laravel-lang-import-export

This package provides artisan commands to import and export language files from and to CSV. This can be used to send translations to agencies that normally work with Excel-like files.

It turns some navigation.php file...

<?php

return [
  'commands' => [
    'next' => 'Next',
    'prev' => 'Previous',
    'play' => 'Play',
  ]
  'tips' => [
    'next' => 'Navigate to the next item',
    'prev' => 'Navigate to the previous item',
    'play' => 'Autoplay the slide show',
  ]
];

...to the following CSV...

key,en
navigation.commands.next,Next
navigation.commands.prev,Previous
navigation.commands.play,Play
navigation.tips.next,"Navigate to the next item"
navigation.tips.prev,"Navigate to the previous item"
navigation.tips.play,"Autoplay the slide show"

...and vice versa.

Installation

Laravel 8.* and above

composer require ufirst/lang-import-export:^8.1.0

Laravel 7.*

composer require ufirst/lang-import-export:^7.0.0

Finally add the following line to the providers array of your app/config/app.php file:

    'providers' => [
        /* ... */
        'UFirst\LangImportExport\LangImportExportServiceProvider'
    ]

Laravel 5.*

For Laravel 5.* checkout the legacy branch and require version ^5.1.2

The usage of the legacy version of this package is slightly different

As an alternative you can checkout the fork of this repository highsolutions/laravel-lang-import-export

Usage

The package currently provides two commands, one for exporting the files and one for importing them back:

Export

# export all locales with all groups to console
php artisan lang-export:csv
# export all locales with all groups to csv file
php artisan lang-export:csv --output /some/file.csv
# custom csv delimiter and enclosure
php artisan lang-export:csv --delimiter=";" --enclosure='"' --output=/some/file.csv
# export single locale
php artisan lang-export:csv -l en --output=/some/path/translations-en.csv
# export single translation group
php artisan lang-export:csv -g navigation --output=/some/path/navigation-all-langs.csv

You can optionally pass the -l (locale) and the -g (group) as options. The group is the name of the langauge file without its extension. You may define options for your desired CSV format.

Import

# import translations from csv
php artisan lang-import:csv /some/file.csv
# import from custom csv format
php artisan lang-import:csv --delimiter=";" --enclosure='"' --escape='\\' /some/file.csv
# import and merge over existing translation file
php artisan lang-import:csv --merge=true /some/file.csv

During import the locale is extracted from the first row of the CSV file. Translation groups are guessed from the translation keys e.g. navigation.tips.next is imported to navigation group

Changelog

8.1.1

  • added support for laravel 10
  • fixed deprecated warnings for PHP 8.2+

8.1.0

  • added support for laravel 9
  • dropped support below laravel 8
  • automatic service provider and alias discovery

8.0.2

  • merge imported csv with existing translations by adding --merge=true option to import command

8.0.1

  • fix: header delimiter and enclosure did not respect the given options during export

8.0.0

  • added support for Laravel 8.x

7.1.0

  • automatically create translation files during import based on translation keys in csv
  • formatted code (PSR-2)

7.0.0

  • added support for laravel:^7.0.0
  • added feature to export all locales and groups in a single run
  • the import command will guess the locale and the translation group from the csv
  • added symfony/var-exporter for new array syntax during the import command

5.1.2

  • legacy version
  • compatible with laravel:^5.4

Alternatives to ufirst/lang-import-export

maatwebsite/excel

Supercharged Excel exports and imports in Laravel

189,862,379 12,721
kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

1,998,172 331
usmanhalalit/laracsv

A Laravel package to easily generate CSV files from Eloquent model.

1,951,662 606
vitorccs/laravel-csv

PHP Laravel package to create CSV files in a memory-optimized way

271,582 32
lukasss93/laravel-larex

Translate your Laravel application from a single CSV file!

130,097 98

Version History

Version Released PHP Laravel License
8.1.1 >=7.3 ^8.0|^9.0|^10.0 MIT
8.1.0 >=7.3 ^8.0|^9.0 MIT
8.0.2 >=5.3.0 5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0 MIT
8.0.1 >=5.3.0 5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0 MIT
8.0.0 >=5.3.0 5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0 MIT
Pre-releases (1)
Version Released PHP Laravel License
1.0.0-beta >=5.3.0 ~4.1