Download the PHP package misaf/vendra-language without Composer
On this page you can find all versions of the php package misaf/vendra-language. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download misaf/vendra-language
More information about misaf/vendra-language
Files in misaf/vendra-language
Package vendra-language
Short Description Multi-language support system with tenant-aware languages and translation lines
License MIT
Homepage https://github.com/misaf/vendra-language
Informations about the package vendra-language
Vendra Language
Tenant-aware language catalogs and database-backed translation lines for Vendra applications.
Features
- A platform locale catalog backed by Symfony Intl and ICU
- Per-tenant enabled languages with exactly one default and sortable display order
- Locale-specific database overrides powered by
spatie/laravel-translation-loader - A global Filament language switcher
- An optional bridge to
misaf/vendra-localization
Requirements
- PHP 8.3+
- Laravel 13
- Filament 5
misaf/vendra-supportsymfony/intl
Installation
The service provider and Filament plugin are discovered automatically.
Locale catalog
Every locale exposed by Symfony Intl may be installed for a tenant from the searchable Languages resource. The preferred locale subset for host integrations may still be configured in config/vendra-language.php:
Values use canonical web/BCP-47 tags and must exist in the ICU locale catalog. This preferred subset does not limit which locales may be installed. Tenant language records store the locale, enabled status, default flag, and display position; localized names are derived from ICU.
Usage
Enable a language for the current tenant:
The first enabled language becomes the default automatically. Setting another language as default clears the previous default for the current tenant, and deleting the default promotes the first remaining language in display order.
Create a translation line and read it through Laravel's translator:
To override a package translation, store the package translation namespace separately from the translation file group:
Leave namespace empty for application translations. In Laravel's namespace::group.key syntax, the package name is the namespace and the translation file name is the group.
Database values override only the locale for which a non-blank value is stored. Missing and blank values leave that locale's file translation intact, allowing Laravel's normal fallback behavior to run afterward.
Applications that replace translation-loader.model may implement Misaf\VendraLanguage\Contracts\NamespacedLanguageLine to receive package namespaces. Models without the contract continue to support application translations, while explicit custom loaders and translation managers remain authoritative.
Load the current tenant's enabled languages in display order:
Optional localization bridge
When misaf/vendra-localization is installed, this package supplies its supported locale catalog and appends the tenant-default resolver at the end of the resolver chain. Explicit user, route, query, and header preferences therefore retain priority.
Filament
The configured panels expose Languages and Language Lines within the Localization cluster. Language lines can override keys discovered in application and Vendra package translation files. Their form displays all enabled tenant locales together and retains stored values for locales that are later disabled. Installed languages can be temporarily disabled from the Languages table without deleting them. The Languages table reports override coverage per locale, while the Language Lines table reports enabled-locale completion and identifies missing locales.
The global language switcher uses the current tenant's enabled languages in display order and falls back to config('app.fallback_locale') when none are enabled.
Testing
License
MIT. See LICENSE.
All versions of vendra-language with dependencies
bezhansalleh/filament-language-switch Version ^5.0
misaf/vendra-support Version self.version
spatie/eloquent-sortable Version ^5.0.1
spatie/laravel-package-tools Version ^1.93.1
spatie/laravel-translation-loader Version ^2.8.3