dreadlabs/kunstmaan-german-backend-bundle
Installation Add the bundle via Composer:
composer require dreadlabs/kunstmaan-german-backend-bundle
Register it in config/bundles.php (Laravel 5.4+) or AppKernel.php (older versions):
// config/bundles.php
DreadLabs\KunstmaanGermanBackendBundle\DreadLabsKunstmaanGermanBackendBundle::class => ['all' => true],
Or in AppKernel.php (if using Symfony/Kunstmaan):
new DreadLabs\KunstmaanGermanBackendBundle\DreadLabsKunstmaanGermanBackendBundle(),
Clear Cache After installation, clear Kunstmaan’s cache:
php bin/console kunstmaan:cache:clear
First Use Case Switch the Kunstmaan backend to German via the language selector (if available) or force it via URL:
/de/admin
Verify German translations appear in the UI (e.g., menus, buttons, validation messages).
Localization Overrides
Resources/translations/messages.de.xlf or .yml).
Example (messages.de.yml):
kunstmaan_admin:
node:
create: "Erstelle neuen Knoten"
Integration with Kunstmaan’s Translation System
trans() helper in templates:
{{ 'kunstmaan_admin.node.create'|trans }}
transChoice filter.Theme-Specific Adjustments
Resources/config/translations.xml (if using XLIFF).Resources/config/translations.yml (if using YAML).kunstmaan:translation:dump:
php bin/console kunstmaan:translation:dump
Validation Messages
validation.messages.de.xlf file.config/parameters.yml:
locale: de
default_locale: en
~ in YAML to override specific keys without duplicating the entire file.Cache Dependencies
php bin/console cache:clear
php bin/console kunstmaan:cache:clear
Missing Translations
Resources/translations/. Contribute missing translations to the community or extend them locally.Locale Configuration
config/parameters.yml:
kunstmaan_admin_locale: de
AppKernel.php:
$kernel->setLocale('de');
Symfony/Kunstmaan Version Mismatch
kunstmaan/admin-bundle:^3.0). Fork and update if needed.APP_DEBUG=true) to log missing translation keys in var/log/dev.log.php bin/console kunstmaan:translation:dump --force
Custom Translation Domains
Extend the bundle by adding new translation domains in config.yml:
kunstmaan_german_backend:
domains:
- 'your_custom_domain'
Dynamic Language Switching
Implement a language switcher in your backend using Kunstmaan’s NodeService and Locale utilities:
$locale = $this->get('kunstmaan_admin.locale');
$locale->setLocale('de');
Fallback Logic
Override the fallback locale in services.yml:
kunstmaan_admin.locale:
class: Kunstmaan\AdminBundle\Helper\Locale
arguments:
- '%locale%'
- '%default_locale%' # Set to 'en' or another fallback
How can I help you explore Laravel packages today?