Download the PHP package zaber-dev/laravel-localization without Composer

On this page you can find all versions of the php package zaber-dev/laravel-localization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-localization

Laravel Localization

Latest Version on Packagist Run Tests Total Downloads PHP Version Require License

Supports: Laravel 11, 12 & 13+ • PHP 8.2+ • Database

Application-level multilingual content management and provider-agnostic translation orchestration for Laravel.

Manage localizations using stateful entity lifecycles, attribute-level content fingerprinting, AI-ready translation pipelines, Scout-compatible search indexing, and transparent Eloquent model proxies — all through a clean, expressive API.

Language is an application concern, not just a presentation concern. Modern applications generate content with AI, send translations to human editors for review, publish across multi-region clusters, and need to know exactly which attributes became outdated when source models change.


Quick Example


Common Use Cases

Laravel Localization is ideal for:


Why not Spatie Laravel Translatable or Raw JSON Columns?

Spatie's package is excellent for simple string storage. However, enterprise applications require lifecycle awareness, AI pipeline integration, and granular staleness detection.

Feature Spatie Translatable Raw JSON Columns Laravel Localization
Primary Purpose Simple attribute storage Loose JSON storage Application-Level Multilingual Lifecycle
Transparent Model Proxy ⚠️ Partial ❌ Manual ✅ Native (HasLocalizations)
Stateful Lifecycle Workflows ❌ None ❌ None ✅ Draft, Generated, NeedsReview, Approved, Published
Attribute-Level Content Fingerprinting ❌ None ❌ None ✅ Attribute-Level Content Fingerprinting
Partial Staleness Detection ❌ All or nothing ❌ None ✅ staleAttributes() identifies exact dirty keys
AI Metadata Tracking ❌ None ❌ None ✅ Provider, Model, Tokens, Cost & Prompt Version
AI Pipeline Batching ❌ Manual ❌ Manual ✅ Localization::batch([...])->dispatch()
Fallback Chains ⚠️ Global Config ❌ Manual ✅ Per-Request & Per-Locale Fallback Chains
Laravel Scout Indexing ❌ Manual ❌ Complex ✅ Native (toLocalizedSearchArray())
CLI Artisan Diagnostics ❌ None ❌ None ✅ localization:missing & localization:stale

Features


Documentation


Installation

Install the package via Composer:

Publish the configuration file and database migrations:

Run database migrations to create the localizations table:


Configuration

The configuration file config/localization.php allows you to set default locales, database table names, and fallback chains:


Usage Guide

1. Preparing Eloquent Models

Implement Localizable contract and add the HasLocalizations trait to any Eloquent model:


2. Transparent Model Proxy

Accessing translatable attributes automatically inspects the active application locale (app()->getLocale()). If a translation payload exists, it is returned transparently:


3. Reading DTOs (LocalizationInfo)

To inspect metadata, state, or completion metrics, retrieve the strongly-typed LocalizationInfo Data Transfer Object:


4. Attribute-Level Content Fingerprinting & Stale Detection

Laravel Localization calculates a content fingerprint (MD5 hash) for each translatable attribute when localizations are saved. When the source model changes, only modified fields are flagged:


5. Storing Translations & AI Metadata

Store translation payloads manually or through automated background jobs, passing rich execution telemetry:


6. AI Batching & Generation Pipelines

Trigger batch translation pipelines across multiple models and locales:

Listen to LocalizationRequested events in your application listener:


7. Stateful Lifecycle Workflows

Transition translations through formal publication stages:


8. Querying & Scopes

Query models based on translation presence, missing locales, or lifecycle states:


9. Laravel Scout Search Indexing

Flatten all localized content for full-text search indexing engines:

Produces indexed fields like title_fr, content_fr, title_de, content_de.


10. CLI Diagnostics Commands

Audit missing and stale translations directly from Artisan:


Testing

Run the test suite using PHPUnit:


License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-localization with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
nesbot/carbon Version ^2.63|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zaber-dev/laravel-localization contains the following files

Loading the files please wait ...