PHPackages                             shishima/laravel-translate-spreadsheet - 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. shishima/laravel-translate-spreadsheet

ActiveLibrary

shishima/laravel-translate-spreadsheet
======================================

This package is used to translate spreadsheet files

v1.7(1y ago)18MITPHPPHP ^8.1

Since Nov 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/shishima123/laravel-translate-spreadsheet)[ Packagist](https://packagist.org/packages/shishima/laravel-translate-spreadsheet)[ Docs](https://github.com/shishima/laravel-translate-spreadsheet)[ RSS](/packages/shishima-laravel-translate-spreadsheet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (5)Versions (10)Used By (0)

Translate Spreadsheet
=====================

[](#translate-spreadsheet)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6615a299535d06f2e6c697ec931a83a6c52e66c14a65546e2a6ca7a5802e86f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7368697368696d612f6c61726176656c2d7472616e736c6174652d73707265616473686565742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shishima/laravel-translate-spreadsheet)[![Total Downloads](https://camo.githubusercontent.com/ebe49eb2eca10e382aacc22bce7c798c9991e4af83ecbc2ba8d35b3effc1ac7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7368697368696d612f6c61726176656c2d7472616e736c6174652d73707265616473686565742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shishima/laravel-translate-spreadsheet)

This package serves the purpose of translating the contents within the spreadsheet file. It facilitates the transition from the original language to your preferred language

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

[](#installation)

You can install the package via composer:

```
composer require shishima/laravel-translate-spreadsheet
```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --provider="Shishima\TranslateSpreadsheet\TranslateSpreadsheetServiceProvider"

```

After publishing the configuration file, you can edit the app/config/translate-spreadsheet.php file to customize the settings.

Usage
-----

[](#usage)

### translate

[](#translate)

The file can be a path to a file on the system

```
use Shishima\TranslateSpreadsheet\Facades\TranslateSpreadsheet;

$fileInput = public_path('demo.xlsx');
TranslateSpreadsheet::translate($fileInput);
```

Or it could be a file retrieved from the `request` when using the `POST` method in a form submit with ``.

```
TranslateSpreadsheet::translate($request->file('file'));
```

### setTransTarget

[](#settranstarget)

To set the desired translation language target

```
TranslateSpreadsheet::setTransTarget('en')->translate($file);
```

### setTransSource

[](#settranssource)

To set the desired translation language source

```
TranslateSpreadsheet::setTransSource('en')->translate($file);
```

**IMPORTANT!** Pass in `null` if you want to use language detection

### setShouldRemoveSheet

[](#setshouldremovesheet)

Clear the current sheets after translation is complete. The parameter passed to the method is `true/false`.

```
TranslateSpreadsheet::setShouldRemoveSheet(true)->translate($file);
```

### setOutputDir

[](#setoutputdir)

Directory to store files after translation

```
TranslateSpreadsheet::setOutputDir('translate/')->translate($file);
```

**IMPORTANT!** The file will be stored in the `public` directory, not in the `storage` directory.

### setCloneSheetPosition

[](#setclonesheetposition)

Position of the cloned sheets

The parameter passed in is enum `ClonePosition`. You can refer to it in the file Enumerations/ClonePosition.php for more detail.

```
use Shishima\TranslateSpreadsheet\Enumerations\ClonePosition;

TranslateSpreadsheet::setCloneSheetPosition(ClonePosition::AppendLastSheet)->translate($file);
```

### highlightSheet

[](#highlightsheet)

Sheets will be highlighted after export

```
TranslateSpreadsheet::highlightSheet(true)->translate($file);
```

### translateSheetName

[](#translatesheetname)

Sheets Name will be translated after export

```
TranslateSpreadsheet::translateSheetName(true)->translate($file);
```

### enableDebug

[](#enabledebug)

For logging translated sentences into a log file for debugging purposes

```
TranslateSpreadsheet::enableDebug()->translate($file);
```

To disable this feature, pass `false` as the argument.

Translate Engine
----------------

[](#translate-engine)

The package supports two translation engines: Google Translate and Gemini

It can be installed through the `translate_engine` setting in the config file

Alternatively, you can use the setTranslateEngine function. The parameter to be passed is an Enum TranslateEngine, which can be either `TranslateEngine::Gemini` or `TranslateEngine::Google`

```
use Shishima\TranslateSpreadsheet\Enumerations\TranslateEngine;

TranslateSpreadsheet::setTranslateEngine(TranslateEngine::Gemini)->translate($file);
```

### Google Translate

[](#google-translate)

No need for setting

### Gemini

[](#gemini)

This functionality has been developed from [google-gemini-php/laravel](https://github.com/google-gemini-php/laravel) library

Therefore, please install this package before use

### Testing

[](#testing)

```
composer test
```

### Demo

[](#demo)

Utilize the repository below as a reference for how to use it.

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Phuoc Nguyen](https://github.com/shishima)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

Special Thanks
--------------

[](#special-thanks)

- [stichoza/google-translate-php](https://github.com/Stichoza/google-translate-php)
- [phpoffice/phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance44

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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 ~58 days

Recently: every ~104 days

Total

9

Last Release

440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e4effd2b4e8e83345f4d9120d9eeea8c57527ed6b8cbfe20a6111827cb43373?d=identicon)[shishima](/maintainers/shishima)

---

Top Contributors

[![shishima123](https://avatars.githubusercontent.com/u/43268912?v=4)](https://github.com/shishima123 "shishima123 (16 commits)")

---

Tags

laravel-packagespreadsheettranslateshishimatranslate-spreadsheet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shishima-laravel-translate-spreadsheet/health.svg)

```
[![Health](https://phpackages.com/badges/shishima-laravel-translate-spreadsheet/health.svg)](https://phpackages.com/packages/shishima-laravel-translate-spreadsheet)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[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)
