kirby-i18n-workflows
Manages Kirby multi-language workflows, translations, and localized labels. Use when dealing with languages, translation keys, placeholders, or importing/exporting translations.
When & Why to Use This Skill
This Claude skill optimizes Kirby CMS internationalization (i18n) by managing multi-language workflows, translation keys, and localized labels. It helps developers maintain clean codebases, audit missing translations, and handle complex language variables, significantly reducing the manual effort required for global website deployment and localization management.
Use Cases
- Auditing and Syncing Translation Keys: Automatically scan site templates and snippets for translation calls to identify and resolve missing keys in language files.
- Managing Localized UI Labels: Implement a robust system for translating interface elements and field options at render time, keeping content files language-neutral.
- Handling Language Variables and Placeholders: Streamline the configuration and usage of dynamic placeholders within translated strings to ensure consistent multi-language output.
- Streamlining Translation Data Exchange: Simplify the process of importing and exporting translation arrays between the Kirby environment and external localization workflows.
| name | kirby-i18n-workflows |
|---|---|
| description | Manages Kirby multi-language workflows, translations, and localized labels. Use when dealing with languages, translation keys, placeholders, or importing/exporting translations. |
Kirby i18n Workflows
KB entry points
kirby://kb/scenarios/46-i18n-field-options-and-labelskirby://kb/scenarios/47-i18n-find-translation-keyskirby://kb/scenarios/48-i18n-import-export-translationskirby://kb/scenarios/72-filter-by-languagekirby://kb/scenarios/73-language-variables-and-placeholders
Required inputs
- Enabled languages and default language.
- Where translation keys live and desired naming scheme.
- Which content is translated vs label-only.
Default translation rule
- Use
t('key', 'fallback')in templates and snippets. - Keep stored content language-neutral when possible; translate labels at render time.
- Maintain fallback strings in the default language file.
Import/export hint
return [
'site.title' => 'Example',
];
Missing key audit
- Run
rg -F 't(' siteand compare keys withsite/languages/*.php. - Add missing keys to the default language file first.
Common pitfalls
- Storing translated labels in content instead of language files.
- Using translation keys without fallback strings.
Workflow
- Confirm language setup with
kirby://config/languagesand locate language files viakirby://roots. - Inspect templates/snippets/controllers for translation usage; use
rgto findt(calls if needed. - Search the KB with
kirby:kirby_search(examples: "translate field options", "find translation keys", "import export translations", "language variables placeholders"). - Update language files (
site/languages/*.php) or config maps for option labels. - Ensure templates render translated labels (not stored keys) and use fallbacks.
- Verify by rendering representative pages in each language (
kirby:kirby_render_page).