Download the PHP package rdcstarr/laravel-locale without Composer
On this page you can find all versions of the php package rdcstarr/laravel-locale. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-locale
laravel-locale
Database-driven language and country management for Laravel 13.
- Languages — ISO 639-1, enabled/default flags
- Countries — ISO 3166-1 alpha-2, flag emoji, timezone, E.164 calling code, primary language
- Octane-safe — stateless singleton service, current locale read dynamically per request
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.3 |
| Laravel | ^13.0 |
Installation
Run the install command to publish and run migrations, then seed languages, countries and their relationships:
Manual installation
If you prefer to control the process yourself, publish the migrations without running the install command:
Then run the migrations and seed the reference data:
Note: Migrations run automatically without publishing — skip
vendor:publishif you do not need to modify the migration files.
Languages
Countries
Models
Language
| Column | Type | Notes |
|---|---|---|
id |
bigint | |
name |
string | e.g. Romanian |
code |
string(5) | ISO 639-1, e.g. ro |
enabled |
boolean | default true |
default |
boolean | default false |
Country
| Column | Type | Notes |
|---|---|---|
id |
bigint | |
name |
string | e.g. Romania |
code |
string(2) | ISO 3166-1 alpha-2, e.g. RO |
flag |
string | URL or path |
flag_emoji |
string | e.g. 🇷🇴 |
timezone |
string | e.g. Europe/Bucharest |
calling_code |
string(10) | ITU-T E.164, e.g. +40, +1 |
primary_language_id |
FK → languages |
The country_language pivot table stores all official languages per country with an is_official boolean.
Octane compatibility
LocaleService is registered as a singleton but stores no request-scoped state — the current locale is always read dynamically via app()->getLocale(), so it is safe to reuse across requests on a long-lived worker.
All versions of laravel-locale with dependencies
laravel/framework Version ^13.0
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^13.0