laravel-enso/localisation

Language and translation management for Laravel Enso

Maintainers

Package info

github.com/laravel-enso/localisation

pkg:composer/laravel-enso/localisation

Statistics

Installs: 61 374

Dependents: 5

Suggesters: 0

Stars: 13

Open Issues: 2

5.5.2 2026-04-23 07:22 UTC

This package is auto-updated.

Last update: 2026-04-23 07:29:34 UTC


README

License Stable Downloads PHP Issues Merge Requests

Description

Localisation manages Enso languages, JSON translation files, and request-time language selection.

The package exposes language CRUD and translation-file editing endpoints, registers the set-language middleware alias, and ships commands for publishing locale files and scanning the codebase for missing translation keys.

It is intended for Enso applications that maintain multiple UI languages and JSON translation stores.

Installation

Install the package:

composer require laravel-enso/localisation

Run the package migrations:

php artisan migrate

Optional publishes:

php artisan vendor:publish --tag=localisation-config
php artisan vendor:publish --tag=localisation-factory
php artisan vendor:publish --tag=localisation-seeder

Features

  • Language CRUD, options, table init, table data, and Excel export endpoints.
  • JSON translation editing, saving, and key-creation endpoints.
  • set-language middleware alias for per-request locale switching.
  • enso:localisation:publish command for generating locale folders and JSON files.
  • enso:localisation:scan command for finding missing keys and duplicate translations.

Usage

Main route groups:

  • system.localisation.*
  • system.localisation.editTexts
  • system.localisation.getLangFile
  • system.localisation.saveLangFile
  • system.localisation.addKey

Artisan commands:

php artisan enso:localisation:publish --locale=ro
php artisan enso:localisation:scan --dry-run

API

HTTP routes

  • GET api/system/localisation/create
  • POST api/system/localisation
  • GET api/system/localisation/{language}/edit
  • PATCH api/system/localisation/{language}
  • DELETE api/system/localisation/{language}
  • GET api/system/localisation/initTable
  • GET api/system/localisation/tableData
  • GET api/system/localisation/exportExcel
  • GET api/system/localisation/options
  • GET api/system/localisation/editTexts
  • GET api/system/localisation/getLangFile/{language}
  • PATCH api/system/localisation/saveLangFile/{language}
  • PATCH api/system/localisation/addKey

Middleware

  • set-language

Artisan commands

  • enso:localisation:publish
  • enso:localisation:scan

Depends On

Required Enso packages:

Companion frontend package:

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!