resources/boost/skills/translations/SKILL.md
Translation and localization conventions for Laravel. Use when adding user-facing strings, creating translation files, or working with lang/ directory.
npx skillsauth add codebar-ag/coding-guidelines translationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
en and de.lang/ directory or translation test coverage.__() or @lang()en) and German (de) — add keys to both locales when creating new translationslang/{locale}/{group}.php) for domain-specific terms (e.g. sprints., organizations.)lang/{locale}.json) for generic UI labels (Save, Back, Cancel, etc.):placeholder for dynamic values in translation stringsphp artisan test --filter=MissingTranslationMissingTranslationTest.php scans for __(), trans(), and @lang() and verifies every key exists in every locale// lang/en/sprints.php — namespaced keys for domain-specific strings
return [
'step_locked' => 'This step is locked.',
'create_success' => 'Sprint :name was created successfully.',
];
// Usage
__('sprints.step_locked');
__('sprints.create_success', ['name' => $sprint->name]);
// lang/de.json — generic UI labels
{
"Save": "Speichern",
"Back": "Zurück",
"Cancel": "Abbrechen"
}
// Usage
__('Save');
__('Back');
{{-- In Blade templates — always use translation helpers --}}
<button type="submit">{{ __('Save') }}</button>
<p>{{ __('sprints.step_locked') }}</p>
<p>{{ __('Configure the :provider API key.', ['provider' => $provider]) }}</p>
// In PHP — use trans() or __()
throw new ValidationException(__('validation.required', ['attribute' => 'email']));
Log::info(__('sprints.import_started', ['count' => $count]));
// Recommended workflow for adding a new domain key
// 1) Add key to lang/en/sprints.php
// 2) Mirror the same key in lang/de/sprints.php
// 3) Use __() in code
// 4) Run: php artisan test --filter=MissingTranslation
__() or @lang().lang/en/* and lang/de/*.MissingTranslation tests pass after changes.'Save' or 'This step is locked.' directly in views or PHP:placeholder syntax for dynamic values: __('Welcome, :name') with ['name' => $user->name]php artisan test --filter=MissingTranslation after adding or changing translationsREADME.md — project-level language setup and testing commandsBlade/SKILL.md — use __() in Blade for all user-facing textPHPUnit/SKILL.md — MissingTranslationTest validates translation coveragetools
Reusable behaviour shared across multiple unrelated classes. Traits provide shared Eloquent scopes, accessors, lifecycle hooks, and small stateless helper methods.
development
Tailwind CSS v4 styling conventions. Use when working with CSS, Tailwind utilities, or customizing the theme in Laravel projects.
development
Orchestration classes that coordinate multiple Actions, external APIs, or domain operations into a cohesive workflow. Services own transaction boundaries and third-party API integrations.
development
Saloon-based service layer pattern for all external API integrations. Every new external API integration must use Saloon — no raw HTTP calls.