Utilities for Flarum Language Packs
This package provides useful utilities for Flarum Language Packs.
You can install this package using Composer:
composer require flarum-lang/utils
This is an extender dedicated for language packs with multiple variants of translations (for example formal and informal translations).
Use it instead of Flarum\Extend\LanguagePack
in extend.php
:
return [
new FlarumLang\Utils\Extend\LanguagePackWithVariants([
'label' => 'Variant',
'variants' => [
'informal' => 'Informal',
'formal' => 'Formal',
],
'defaultVariant' => 'informal',
]),
];