laravel-lang/config
Official configuration package for Laravel Lang, providing shared settings and defaults used across its localization tools so you can manage language files and locales consistently in Laravel apps.
config('services.stripe.endpoint.eu') for EU users automatically, or toggle features like config('features.new_ui.es') based on locale.config('legal.terms.es') for Spain).config('ui.theme.dark_mode')).config('experiment.cta_button.fr')) without code changes.config('privacy.policy.gdpr')).config/locales/en.php), avoiding duplication in databases or external services.config() helper, requiring minimal learning curve. Supports IDE autocompletion and validation out of the box.config/app.php values that vary by locale, region, or user segment).es_MX → es → en) without manual merging logic.laravel-config-array or a CMS integration (e.g., Strapi, Contentful) for dynamic updates.config() helper.ParameterBag).config:clear). For live updates, pair with Redis or a config service (e.g., LaunchDarkly, Unleash).reverb or Spatie’s laravel-validation-rules for schema validation.laravel-multitenancy for tenant-specific configs.*"This package enables us to ship localized configurations—like region-specific APIs, legal disclaimers, or UI elements—without custom development, accelerating our [Q3 international expansion] by 40%. Key Benefits:
Example Use Cases:
config('services.payment.gateway.es') for localized payment processing.config('privacy.gdpr.enabled') without manual checks.config('ui.cta_button.fr')) reduces dev overhead.Ask: Should we prioritize this for [Product X]’s global launch to reduce risk and cost?"
*"The laravel-lang/config package provides a zero-boilerplate way to manage language-specific configs using Laravel’s existing config() helper. Here’s the breakdown:
Key Features:
config('app.locale_aware_setting') with chains (e.g., es_MX → es → default).config:clear).Integration Steps:
php artisan vendor:publish --provider="LaravelLangConfigServiceProvider"
config/app.php:
'providers' => [
LaravelLangConfigServiceProvider::class,
],
$endpoint = config('services.stripe.endpoint'); // Falls back to default
Tradeoffs:
config:clear after updates (or automate with Git hooks).reverb for schema validation.Alternatives:
| Solution | Pros | Cons | Fit for laravel-lang/config |
|---|---|---|---|
| Custom Solution | Full control | High maintenance cost | ❌ No |
Spatie’s laravel-translation |
Database-backed, real-time | Overkill for configs | ❌ No (unless paired with Redis) |
| Environment Variables | Secure, real-time | No fallbacks, manual setup | ❌ No (for locale-specific configs) |
| Laravel’s Native Config | Simple, built-in | No localization support | ❌ No (unless manual logic) |
Recommendation: Use this package for file-based, locale-specific configs where fallbacks and maintainability are priorities. Pair with reverb for validation and Redis for real-time updates if needed."
How can I help you explore Laravel packages today?