chinleung/laravel-locales
Add easy locale support to Laravel with simple config and helper functions. Set and get the current locale with locale(), and manage supported locales with locales(), prioritizing app.locales over package config. Supports Laravel 6–13 (versioned).
/es/) by providing a standardized, config-driven approach./blog/es).Adopt if:
Look elsewhere if:
translatable attributes) → Use spatie/laravel-translatable.voku/portable-ascii or Laravel’s built-in tools.For Executives: *"This package lets us ship multilingual support fast and cheaply by leveraging Laravel’s built-in tools. Instead of building a custom system (which would take weeks and risk bugs), we’ll use a lightweight, config-driven solution that handles:
/es/blog) with minimal dev work.locale('fr').It’s low-risk (MIT-licensed, Laravel-native) and scalable for our roadmap. We’ll start with core features, then expand if needed. Cost: $0 (open-source)."*
For Engineering: *"This package gives us two key advantages:
app()->setLocale() calls with concise helpers (locale(), locales()) and a single config file for supported languages.Route::prefix('{locale}')).locales(['en', 'fr'])).Trade-offs:
Proposal:
Alternatives:
spatie/laravel-translatable) or unsupported (e.g., abandoned repos)."*How can I help you explore Laravel packages today?