meirsadan/kirby-he
Composer 安装命令:
composer require meirsadan/kirby-he
包简介
Hebrew language support for Kirby CMS
README 文档
README
Hebrew language support for Kirby CMS v5+. Registers the Hebrew Panel
(interface) translations at runtime via Kirby's plugin translations
extension — nothing is copied into the kirby/ core directory, so the setup
survives every Kirby update.
Installation
composer require meirsadan/kirby-he
As a kirby-plugin it installs to site/plugins/kirby-he and registers its
translations automatically. No install/copy step.
What it registers
- Kirby core Panel translations (
assets/translations/he.json). - kirby-seo (
tobimori/kirby-seo) Panel translations (assets/kirby-seo/he.json), with each key prefixedseo.to match how that plugin namespaces its own strings.
Interface-language dropdown
Kirby builds the Panel's account Language selector from
Translations::load(), which scans kirby/i18n/translations/*.json on disk —
a plugin-registered locale alone does not appear there. So the plugin
self-heals: on load it copies its bundled he.json into
kirby/i18n/translations/ whenever the file is missing (idempotent, and
recreated automatically after a Kirby update wipes it). If the directory is
read-only it silently skips. This is the one place a file must live in core;
it's provisioned automatically, so there's still nothing to do by hand.
Tip: add /kirby/i18n/translations/he.json to your project's .gitignore so
the auto-provisioned file doesn't show up as a change.
Slug rules (manual, one-time per project)
Slug transliteration rules are a separate subsystem: Kirby builds a
language's slug rules from kirby/i18n/rules/{code}.json plus that
language's own slugs. A plugin cannot supply either, so the rules can't be
registered here.
Add them to your Hebrew language definition, site/languages/he.php:
return [ 'code' => 'he', // ... 'slugs' => [ 'א' => 'a', 'ב' => 'b', 'ג' => 'g', 'ד' => 'd', 'ה' => 'h', 'ו' => 'v', 'ז' => 'z', 'ח' => 'ch', 'ט' => 't', 'י' => 'y', 'ך' => 'ch', 'כ' => 'ch', 'ל' => 'l', 'ם' => 'm', 'מ' => 'm', 'ן' => 'n', 'נ' => 'n', 'ס' => 's', 'ע' => 'a', 'ף' => 'f', 'פ' => 'p', 'ץ' => 'tz', 'צ' => 'tz', 'ק' => 'q', 'ר' => 'r', 'ש' => 'sh', 'ת' => 't', ], ];
The canonical rule set also ships in assets/rules/he.json for reference.
Requirements
- PHP 8.1+
- Kirby CMS 5.0+
Updating the translations
Edit the JSON files in assets/ and tag a new release. Consumers get the
update on their next composer update — again, with nothing touching core.
License
MIT. See LICENSE.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-01