PHPackages                             orkhanahmadov/spreadsheet-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. orkhanahmadov/spreadsheet-translations

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

orkhanahmadov/spreadsheet-translations
======================================

Spreadsheet translations for Laravel

3.0.0(8mo ago)225.9k↓41.7%1MITPHPPHP ^8.2CI passing

Since Feb 28Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/orkhanahmadov/spreadsheet-translations)[ Packagist](https://packagist.org/packages/orkhanahmadov/spreadsheet-translations)[ Docs](https://github.com/orkhanahmadov/spreadsheet-translations)[ GitHub Sponsors](https://github.com/orkhanahmadov)[ RSS](/packages/orkhanahmadov-spreadsheet-translations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (13)Used By (0)

Spreadsheet translations for Laravel
------------------------------------

[](#spreadsheet-translations-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2a4178ac86bab826d1f4529ded8c9097841d1191d452e5397ed6221c9b92ea49/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f726b68616e61686d61646f762f73707265616473686565742d7472616e736c6174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orkhanahmadov/spreadsheet-translations)[![Total Downloads](https://camo.githubusercontent.com/1b5105be95a96040e4c6dd817d502d80f2f2378f5f570f3e3b387df5414dae7c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f726b68616e61686d61646f762f73707265616473686565742d7472616e736c6174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orkhanahmadov/spreadsheet-translations)[![GitHub Actions](https://github.com/orkhanahmadov/spreadsheet-translations/actions/workflows/main.yml/badge.svg)](https://github.com/orkhanahmadov/spreadsheet-translations/actions/workflows/main.yml/badge.svg)

[![Spreadsheet Translation](https://camo.githubusercontent.com/cd1576b57f15cb50ba03ff4bffcecf0d511b76f74a0f0c7749bcd1497db2f267/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f53707265616473686565742532305472616e736c6174696f6e73253230666f722532304c61726176656c2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6f726b68616e61686d61646f7625324673707265616473686565742d7472616e736c6174696f6e73267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d456173696c792b6372656174652b4c61726176656c2b7472616e736c6174696f6e2b66696c65732b66726f6d2b73707265616473686565742b266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/cd1576b57f15cb50ba03ff4bffcecf0d511b76f74a0f0c7749bcd1497db2f267/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f53707265616473686565742532305472616e736c6174696f6e73253230666f722532304c61726176656c2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6f726b68616e61686d61646f7625324673707265616473686565742d7472616e736c6174696f6e73267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d456173696c792b6372656174652b4c61726176656c2b7472616e736c6174696f6e2b66696c65732b66726f6d2b73707265616473686565742b266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Why?
----

[](#why)

Maintaining multi-language support in Laravel applications can be hard

- Laravel's translation files are in plain PHP/JSON files. This assumes that the person who's going to translate the application knows how to work with PHP/JSON files, which is not always the case
- Each locale's translations are located in different folders. For example, the `en` folder contains English translations, and the `de` folder contains German translations. This separation is good on the code level but makes it hard to maintain 2+ locale translations. It is easy to add one new key and translation for English but forget to do it in German since nothing forces this or makes it easy to spot.

Alternatively, you can store the application's translations in a spreadsheet file, something like:

keyendeesdashboard.statisticsStatisticsStatistikEstadísticaslogin.form.first\_nameFirst nameVornameNombre de pilalogin.welcomeWelcomeWilkommenBienvenidaThis solves all the above-mentioned problems:

- The translations maintainer does not need to know how to work with PHP or JSON
- All translations are maintained in a single file and view
- Each translation is located under the locale column, which makes it very easy to spot missing translations

But now the problem is, that Laravel cannot directly work with this spreadsheet file to display translations.

Here comes the `spreadsheet-translations` package! It reads spreadsheet files that contain translations for multiple locales and generates plain JSON files out of it that Laravel can work with.

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

[](#installation)

You can install the package via Composer:

```
composer require orkhanahmadov/spreadsheet-translations
```

Publish config file using:

```
php artisan vendor:publish --provider="Orkhanahmadov\SpreadsheetTranslations\SpreadsheetTranslationsServiceProvider"
```

The config file contains the following parameters:

- `locales` - an array of locale codes that the parser should look for in the spreadsheet. The default is `['en']`
- `filepath` - path to a spreadsheet file. By default, points to the `translations.xlsx` file in the Laravel project's `lang` directory. This config parameter can also use a URL as a remote file location. When a valid URL is provided parser will try to download the file to a temporary local file and parse it.
- `sheet` - defines which sheet should be used in a spreadsheet file. The default is `null`. When `null`, the parser selects an active sheet in the spreadsheet to parse translations from. If you want to use a different sheet, provide the sheet's name on this parameter.
- `header_row_number` - which row should be used as header. The default is `1`. The header row should contain locale codes that are defined as `locales` config parameter
- `key_column` - which column should be used for translation keys. The default is `A` column.
- `ignored_rows` - an array of row numbers that should be ignored when translations are parsed. The default is an empty array.

Usage
-----

[](#usage)

Let's imagine we have the following Excel spreadsheet file which is located in a remote server with a public URL `https://example.com/translations.xlsx`. Spreadsheet contains:

commentskeyendeesDashboard statistics section titledashboard.statisticsStatisticsStatistikEstadísticasignore this row !!!!!First name field on login formlogin.form.first\_nameFirst nameVornameNombre de pilaWelcome page titlelogin.welcomeWelcomeWilkommenBienvenidaWe want to:

- Point parser to the remote file to download and parse
- Parse only `en` and `de` locale translations
- Use the `key` column as key, in this case, column `B` in the spreadsheet coordinates
- Ignore row number 3

Once we publish the config file we need to make the following adjustments:

```
[
    'filepath' => 'https://example.com/translations.xlsx', // direct download URL of the file
    'locales' => ['en', 'de'], // parse `en` and `de` translations only, which means `es` will be ignored
    'key_column' => 'B', // sets key column to B
    'ignored_rows' => [3], // ignore row number 3
]
```

Package ships with an artisan command `translations:generate`.

```
php artisan translations:generate
```

When executed it generates necessary JSON translation files in Laravel's `lang` directory.

For above spreadsheet file and configuration `translations:generate` will generate following folder and file structure:

- `lang/`
    - `en.json`
        - `{"dashboard.statistics": "Stastitics", "login.form.first_name": "First name", "welcome": "Welcome"}`
    - `de.json`
        - `{"dashboard.statistics": "Statistik", "login.form.first_name": "Vorname", "welcome": "Wilkommen"}`

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Orkhan Ahmadov](https://github.com/orkhanahmadov)
- [AirLST GmbH](https://airlst.com)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Alternatives
------------

[](#alternatives)

You can check [larswiegers/laravel-translations-checker](https://github.com/LarsWiegers/laravel-translations-checker) if you want to detect missing translations.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance59

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~83 days

Recently: every ~135 days

Total

12

Last Release

264d ago

Major Versions

1.6.0 → 2.0.02025-02-25

2.0.0 → 3.0.02025-08-28

PHP version history (3 changes)1.0.0PHP ^8.0

1.3.0PHP ^8.1

2.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![orkhanahmadov](https://avatars.githubusercontent.com/u/7041590?v=4)](https://github.com/orkhanahmadov "orkhanahmadov (64 commits)")

---

Tags

laravelmulti-languagespreadsheet translations

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/orkhanahmadov-spreadsheet-translations/health.svg)

```
[![Health](https://phpackages.com/badges/orkhanahmadov-spreadsheet-translations/health.svg)](https://phpackages.com/packages/orkhanahmadov-spreadsheet-translations)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

74310.9M66](/packages/laravel-mcp)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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