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

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

zhylon/laravel-translate
========================

This package can be used to translate your Laravel application.

1.0.1(1y ago)08MITPHPPHP ^8.0

Since Mar 10Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

[![Zhylon Translatable](https://camo.githubusercontent.com/3fc5dc2a7309f0ecf6b2412ed88c4dfe5129643bca385916e429cbf492b537ab/68747470733a2f2f736f6369616c6966792e6769742e63692f5a68796c6f6e2f6c61726176656c2d7472616e736c6174652f696d6167653f6465736372697074696f6e3d3126666f6e743d52616c65776179266973737565733d31266c616e67756167653d31266f776e65723d31267061747465726e3d436861726c696525323042726f776e2670756c6c733d31267374617267617a6572733d31267468656d653d4c69676874)](https://socialify.git.ci/Zhylon/laravel-translate?description=1&font=Raleway&issues=1&language=1&owner=1&pattern=Charlie%20Brown&pulls=1&stargazers=1&theme=Light)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b4a0f228977293193a5e98224430e58aae6336f1b79e954313d29cbdad7fbd68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a68796c6f6e2f6c61726176656c2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zhylon/laravel-translate)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/5d19a62624b258d8e84c28ee739223b8c7cd7dde0c1f323bc1830e549fb7b68e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a68796c6f6e2f6c61726176656c2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zhylon/laravel-translate)[![Support me on Patreon](https://camo.githubusercontent.com/cef3268299ac4e91c241041bc589061c18d2c61f9e8393f33907c2fb23fe11be/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d6874747073253341253246253246736869656c6473696f2d70617472656f6e2e76657263656c2e617070253246617069253346757365726e616d65253344546f62796d617868616d25323674797065253344706174726f6e73267374796c653d666c6174)](https://patreon.com/Tobymaxham)

This package is build on top of [spatie/laravel-translatable](https://github.com/spatie/laravel-translatable). We strongly recommend you to check the original package before using this one.

The key difference is that this package uses [Zhylon Translation](https://translate.zhylon.net/docs) to translate the content. So you don't need to provide the translations, the package will do it for you.

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

[](#installation)

You can install the package via composer:

```
composer require zhylon/laravel-translate
```

If you only want to translate your language files, you can use the `--dev` flag to install the package as a development dependency:

```
composer require --dev zhylon/laravel-translate
```

Configuration
-------------

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --provider="Zhylon\LaravelTranslator\LaravelTranslatorServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'zhylon_translate' => [
        'key'   => env('ZHYLON_TRANSLATE_KEY'), // Your Zhylon Translate API key
        'model' => env('ZHYLON_TRANSLATE_MODEL', 'zhylon'), // The name of the model to translate
    ],
];
```

Zhylon Translate API Key
------------------------

[](#zhylon-translate-api-key)

You need an active account on [Zhylon Translate](https://translate.zhylon.net) to get the API key. You can get the API key from the [API Key](https://translate.zhylon.net/user/api-tokens) page.

Please note, that this is not a free service, you need to have a subscription to use the service. More information about the pricing can be found in the [Docs](https://translate.zhylon.net/docs).

Usage
-----

[](#usage)

You can translate your language files using the following command:

```
# Translate single file
php artisan lang:translate en --file=billing.php

# Using path
php artisan lang:translate en --file=Module/billing.php

# Translate all files
php artisan lang:translate en --all
```

Also, all your translation files can be translated using **Zhylon Translation**.

```
use Illuminate\Database\Eloquent\Model;
use Zhylon\LaravelTranslator\Support\Traits\HasAutoTranslations;

class NewsItem extends Model
{
    use HasAutoTranslations;

    public $translatable = ['name']; // translatable attributes

    // ...
}
```

### WARNING !

[](#warning-)

Currently, the package only supports english and german languages. This is because also the Zhylon Translation API only supports these languages. We are working on adding more languages to the API, so please check the [Zhylon Translation](https://translate.zhylon.net/docs) page for updates.

### Original Package

[](#original-package)

You can still use all the features of the original package, but you don't need to provide the translations. For more information, please check the original package documentation: [spatie/laravel-translatable](https://spatie.be/docs/laravel-translatable)

Changelog
---------

[](#changelog)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Support me
----------

[](#support-me)

[![ko-fi](https://camo.githubusercontent.com/201ef269611db7eb6b5d08e9f756ab8980df3014b64492770bdf13a6ed924641/68747470733a2f2f6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/Z8Z4NZKU)
[![Support me on Patreon](https://camo.githubusercontent.com/cef3268299ac4e91c241041bc589061c18d2c61f9e8393f33907c2fb23fe11be/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e742e7376673f75726c3d6874747073253341253246253246736869656c6473696f2d70617472656f6e2e76657263656c2e617070253246617069253346757365726e616d65253344546f62796d617868616d25323674797065253344706174726f6e73267374796c653d666c6174)](https://patreon.com/Tobymaxham)

Credits
-------

[](#credits)

- [TobyMaxham](https://github.com/TobyMaxham)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

428d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/900ab0a66bf701f3fb99a4db54276b4984cf3cf9b55ccad6df65c034f58be85f?d=identicon)[TobyMaxham](/maintainers/TobyMaxham)

---

Top Contributors

[![TobyMaxham](https://avatars.githubusercontent.com/u/5646469?v=4)](https://github.com/TobyMaxham "TobyMaxham (5 commits)")

---

Tags

laraveltranslationtobymaxhamzhylon

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[longman/laravel-multilang

Package to integrate multi language (multi locale) functionality in Laravel 5.x

5514.4k1](/packages/longman-laravel-multilang)

PHPackages © 2026

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