/fuse-laravel:laravel-i18nfrom fuse-laravel
Implements Laravel translations using __(), trans_choice(), lang files, pluralization, locale middleware, and date/number/currency formatting. Covers PHP vs JSON files, Blade helpers, and queue-safe locale propagation.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | PHP Files | JSON Files |
|---|---|---|
| Keys | Short (messages.welcome) | Full text |
| Nesting | Supported | Flat only |
| Best for | Structured translations | Large apps |
:placeholder replacementsauth.login.title, auth.login.buttonTranslation task?
├── Basic string → __('key')
├── With variables → __('key', ['name' => $value])
├── Pluralization → trans_choice('key', $count)
├── In Blade → @lang('key') or {{ __('key') }}
├── Locale detection → Middleware
├── Format date/money → LocalizationService
└── Package strings → trans('package::key')
| Topic | Reference | When to Consult |
|---|---|---|
| Setup | localization.md | Initial configuration |
| Pluralization | pluralization.md | Count-based translations |
| Blade | blade-translations.md | View translations |
| Middleware | middleware.md | Locale detection |
| Formatting | formatting.md | Date/number/currency |
| Packages | packages.md | Vendor translations |
| Best Practices | best-practices.md | Large app organization |
| Template | When to Use |
|---|---|
| SetLocaleMiddleware.php.md | URL/session locale detection |
| lang-files.md | Translation file examples |
| LocaleServiceProvider.php.md | Centralized localization service |
| LocaleRoutes.php.md | URL prefix locale routing |
// Basic translation
__('messages.welcome')
// With replacement
__('Hello :name', ['name' => 'John'])
// Pluralization
trans_choice('messages.items', $count)
// Runtime locale
App::setLocale('es');
App::currentLocale(); // 'es'
:placeholder for dynamic valuesThe localization API (__(), trans_choice(), App::setLocale()) is unchanged in Laravel 13. Specific points:
Context::add('locale', $locale) propagates the locale into queued jobs (fixes the L12 bug where the locale was lost in ShouldQueue jobs)cache.serializable_classes (default false in L13): list your Locale objects if you cache themSetLocale middleware: compatible with the new PreventRequestForgery middleware from [[laravel-auth]]// app/Jobs/SendNotification.php
public function handle(): void
{
App::setLocale(Context::get('locale', 'en'));
Notification::send($this->user, new OrderShipped());
}
references/best-practices.md (opens in a new tab)references/blade-translations.md (opens in a new tab)references/formatting.md (opens in a new tab)references/localization.md (opens in a new tab)references/middleware.md (opens in a new tab)references/packages.md (opens in a new tab)references/pluralization.md (opens in a new tab)references/templates/LocaleRoutes.php.md (opens in a new tab)references/templates/LocaleServiceProvider.php.md (opens in a new tab)references/templates/SetLocaleMiddleware.php.md (opens in a new tab)references/templates/lang-files.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravel23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning./laravel-architectureUse when structuring a Laravel project, creating services/repositories/actions, implementing dependency injection, or organizing code layers./laravel-attributesUse when migrating Eloquent models, Jobs, Console commands, Controllers, API Resources, Validation, Factories or Seeders to Laravel 13 PHP attributes./laravel-authUse when implementing user authentication, API tokens, social login, or authorization in Laravel 13.Other plugins' skills for the same job