Laravel Multi-LangLaravel Multi-Lang
Overview
  • Getting Started
  • Core Concepts
  • Querying Translations
  • Managing Translations
  • Caching & Performance
  • Automation & CLI
  • Extensibility & Integrations
  • Testing & QA
GitHub
Overview
  • Getting Started
  • Core Concepts
  • Querying Translations
  • Managing Translations
  • Caching & Performance
  • Automation & CLI
  • Extensibility & Integrations
  • Testing & QA
GitHub
  • Start Here

    • Overview
    • Getting Started
    • Core Concepts
  • Working with Translations

    • Querying Translations
    • Managing Translations
    • Locale Middleware
    • Caching & Performance
  • Operations & Scale

    • Automation & CLI
    • Extensibility & Integrations
    • Testing & QA

Overview

Laravel Multi-Lang centralises every moving part you need to internationalise Eloquent models—schema, traits, helpers, scopes, caching, CLI tooling, and observability—into a single, cohesive package. This page gives you the “map of the territory” before we dive into the detailed guides.

Feature matrix

AreaWhat you getWhere to learn more
On-model translationsTranslatable trait, attribute fallbacks, translation helpers, facadeCore Concepts
Querying contentFull suite of whereTranslate* scopes, grouped predicates, wildcard localesQuerying Translations
Managing contentsetTranslation, batch updates, soft deletes with auto-restore, pluralisation helpersManaging Translations
PerformanceEager-loading scopes, per-request caching, shared cache stores, performance tipsCaching & Performance
AutomationAudit/export/import Artisan commands, JSON schema, scheduled snapshotsAutomation & CLI
ExtensibilityCustom cache stores, fallback chains, middleware, observers, broadcastingExtensibility & Integrations
Quality & testingFactories, Pest test coverage, usage patterns in tests, CI tipsTesting & QA

Quick wins

  1. Add the trait: mark your models as Translatable and list the attributes that should become translatable.
  2. Seed translations: use setTranslation() or setTranslationsBatch() to write content per locale.
  3. Query smart: filter translated content with whereTranslate(), whereTranslateLike(), and friends.
  4. Guard performance: eager load via withTranslations() and optionally plug translations into Redis via TranslationCacheStore.
  5. Automate workflows: run multi-lang:audit, multi-lang:export, and multi-lang:import in CI, scheduled jobs, or content pipelines.
  6. Scale safely: rely on soft deletes, cached lookups, and observability hooks to manage large datasets.

Standard translation flow

flowchart LR
    A[Model uses Translatable trait] --> B[Seed translations: setTranslation / batch]
    B --> C[Eager load locales with withTranslations]
    C --> D[Access attributes or translate()]
    D --> E[Query via whereTranslate scopes]
    C --> F[Cache store (array / Redis / custom)]
    B --> G[Audit & export via CLI]
    G --> H[Import translated JSON]

Documentation map

  • New to the package? Start with Getting Started for installation and first translations.
  • See how the trait works internally? Jump to Core Concepts.
  • Filtering records in controllers or repositories? Querying Translations covers every scope.
  • Managing content at scale? Managing Translations explains batch updates, soft deletes, pluralisation, and helpers.
  • Worried about performance? Caching & Performance outlines eager loading, shared caches, and tuning advice.
  • Need automation pipelines? Automation & CLI details the Artisan commands with examples (CI, scheduled exports).
  • Extending behaviour? Extensibility & Integrations documents custom cache stores, fallback chains, middleware, and observers.
  • Write robust tests? Testing & QA shows how to integrate translations into your test suite.

With the lay of the land set, continue with Getting Started or dive straight into the topic most relevant to your project. The remaining guides are intentionally modular—feel free to cherry-pick what you need.

Last Updated: 11/11/25, 2:40 AM
Contributors: Pshtiwan Mahmood
Next
Getting Started