PHPackages                             dusanbre/laravel-tolgee - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. dusanbre/laravel-tolgee

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dusanbre/laravel-tolgee
=======================

Help with Laravel integration of Tolgee service

1.1.0(9mo ago)145.5k↓19.4%3[5 PRs](https://github.com/dusanbre/laravel-tolgee/pulls)MITPHPPHP ^8.2

Since Sep 29Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/dusanbre/laravel-tolgee)[ Packagist](https://packagist.org/packages/dusanbre/laravel-tolgee)[ Docs](https://github.com/dusanbre/laravel-tolgee)[ GitHub Sponsors]()[ RSS](/packages/dusanbre-laravel-tolgee/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (14)Used By (0)

Laravel Tolgee Integration
==========================

[](#laravel-tolgee-integration)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0c35aea17ae5695dab33997f82a5f4e0ec490e92c1d8d2e964f29724d9a05eee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f647573616e6272652f6c61726176656c2d746f6c6765652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dusanbre/laravel-tolgee)[![Total Downloads](https://camo.githubusercontent.com/9a2a5d026450aec6ea797b2bd8f3d9745c8a5afde996af402976c92c92e37766/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f647573616e6272652f6c61726176656c2d746f6c6765652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dusanbre/laravel-tolgee)

This package provides integration with [Tolgee](https://tolgee.io) service with Laravel apps.

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

[](#installation)

You can install the package via composer:

```
composer require dusanbre/laravel-tolgee
```

You can publish the config file with:

```
php artisan vendor:publish --tag="laravel-tolgee-config"
```

This is the contents of the published config file:

```
return [
    /*
     * Specify the path to your language files
     * Default is 'lang' it can be set to 'resources/lang'
     */
    'lang_path' => env('TOLGEE_LANG_PATH', 'lang'),

    /*
     * Specify a language files subfolder, in order to filter specific language files.Please be aware that this applies to subfolders within your base local folders.
     * So if you have folder structure like `lang/en/messages/...`, you can set this env variable to `messages` and package will use only files from messages folder.
     */
    'lang_subfolder' => env('TOLGEE_LANG_SUBFOLDER'),

    /*
     * Host to you Tolgee service instance
     * Please note that if you are using Sail for local development, service need to be in the same docker network
     * and you will need to set host in the format of 'http://{docker_tolgee_service_name}:{docker_tolgee_service_port}'
     */
    'host' => env('TOLGEE_HOST', 'https://app.tolgee.io'),

    /**
     * Project ID of your Tolgee service.
     */
    'project_id' => env('TOLGEE_PROJECT_ID'),

    /**
     * Valid api key from Tolgee service for the given project.
     * Api key needs to have all permissions to manage project.
     */
    'api_key' => env('TOLGEE_API_KEY'),

    /**
     * Base locale of the project.
     * Please note that the locale you set here should match the base language in your project.
     */
    'locale' => env('TOLGEE_LOCALE', 'en'),

    /**
     * Override base locale translations files.
     */
    'override' => env('TOLGEE_OVERRIDE', false),

    /**
     * Accepted translation states. Check Tolgee documentation for available states.
     * Ex: REVIEWED,DISABLED,UNTRANSLATED,TRANSLATED
     */
    'accepted_states' => explode(",", env('TOLGEE_ACCEPTED_STATES', 'REVIEWED')),
];
```

Usage
-----

[](#usage)

Package provides several Artisan commands to work with you translations in Tolgee.

1. Import keys from your local files into Tolgee service

```
php artisan tolgee:keys:sync --with-vendors
```

2. Delete all keys from Tolgee service

```
php artisan tolgee:keys:flush
```

3. Import translations from Tolgee service into your local files

```
php artisan tolgee:translations:sync
```

You will need to have Tolgee instance set up in your config file.

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

[](#configuration)

If you want to use this locally in your project you can run it on the docker container:

1. Add service in your docker-compose.yml

```
...
    tolgee:
        image: tolgee/tolgee
        volumes:
            - sail-tolgee:/data
            - ./tolgee.config.yaml:/config.yaml
        ports:
            - '25432:25432'
            - '9090:8080'
        environment:
            spring.config.additional-location: file:///config.yaml
        networks:
            - sail
...
volumes:
    ...
    sail-tolgee:
        driver: local

```

2. Add config `tolgee.config.yaml` in root of you project

```
tolgee:
  authentication:
    enabled: true
    initial-password: admin
    initial-username: admin
    jwt-secret:  // Random string
  machine-translation:
    google:
      api-key:  // If you want to use google translation
  smtp:
    auth: false
    from: Tolgee
    host: mailpit
    password: 'password'
    port: 1025
    ssl-enabled: false
    username: user@company.com

```

You can see more about configuration and setup on [Tolgee docs](https://tolgee.io/platform/self_hosting/configuration?config-format=yaml)

3. Restart docker containers
4. Publish laravel translation files `php artisan lang:publish`
5. Edit local translation files
6. Use package commands to sync it with Tolgee

### NOTE

[](#note)

You should be able to access Tolgee service on `http://localhost:9090`
When you setup is dockerized, you will need to set TOLGEE\_HOST for docker internal network. In this case that would be `http://tolgee:8080`

Limitations
-----------

[](#limitations)

All operations are constrained to one project.

This will be fixed/implemented in the future.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Dusan Antonijevic](https://github.com/dusanbre)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance68

Regular maintenance activity

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.5% 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 ~34 days

Recently: every ~68 days

Total

10

Last Release

284d ago

Major Versions

0.0.1 → 1.0.02024-09-29

### Community

Maintainers

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

---

Top Contributors

[![dusanbre](https://avatars.githubusercontent.com/u/55688658?v=4)](https://github.com/dusanbre "dusanbre (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![aldrahastur](https://avatars.githubusercontent.com/u/5844861?v=4)](https://github.com/aldrahastur "aldrahastur (1 commits)")[![andreazorzi](https://avatars.githubusercontent.com/u/15615862?v=4)](https://github.com/andreazorzi "andreazorzi (1 commits)")

---

Tags

laraveltolgeeDusan Antonijeviclaravel-tolgee

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/dusanbre-laravel-tolgee/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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