Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

laravel-i18n

verified

Laravel localization - __(), trans_choice(), lang files, JSON translations, pluralization, middleware, formatting. Use when implementing translations.

View on GitHub

Marketplace

fusengine-plugins

fusengine/agents

Plugin

fuse-laravel

development

Repository

fusengine/agents
3stars

plugins/laravel-expert/skills/laravel-i18n/SKILL.md

Last Verified

February 2, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/fusengine/agents/blob/main/plugins/laravel-expert/skills/laravel-i18n/SKILL.md -a claude-code --skill laravel-i18n

Installation paths:

Claude
.claude/skills/laravel-i18n/
Powered by add-skill CLI

Instructions

# Laravel Internationalization

## Agent Workflow (MANDATORY)

Before ANY implementation, launch in parallel:

1. **fuse-ai-pilot:explore-codebase** - Check existing translation patterns
2. **fuse-ai-pilot:research-expert** - Verify Laravel i18n best practices via Context7
3. **mcp__context7__query-docs** - Check Laravel localization documentation

After implementation, run **fuse-ai-pilot:sniper** for validation.

---

## Overview

| Feature | PHP Files | JSON Files |
|---------|-----------|------------|
| Keys | Short (`messages.welcome`) | Full text |
| Nesting | Supported | Flat only |
| Best for | Structured translations | Large apps |

---

## Critical Rules

1. **Never concatenate strings** - Use `:placeholder` replacements
2. **Always handle zero** in pluralization
3. **Group by feature** - `auth.login.title`, `auth.login.button`
4. **Extract strings early** - No hardcoded text in views
5. **Validate locales** - Use enum or whitelist

---

## Decision Guide

```
Translation 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')
```

---

## Reference Guide

### Concepts (WHY & Architecture)

| Topic | Reference | When to Consult |
|-------|-----------|-----------------|
| **Setup** | [localization.md](references/localization.md) | Initial configuration |
| **Pluralization** | [pluralization.md](references/pluralization.md) | Count-based translations |
| **Blade** | [blade-translations.md](references/blade-translations.md) | View translations |
| **Middleware** | [middleware.md](references/middleware.md) | Locale detection |
| **Formatting** | [formatting.md](references/formatting.md) | Date/number/currency |
| **Packages** | [packages.md](references/packages.md) | Vendor translations |
| **Best Practices** | [best-

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3167 chars