| .. | ||
| js | ||
| src/Extend | ||
| .editorconfig | ||
| CHANGELOG.md | ||
| composer.json | ||
| LICENSE | ||
| README.md | ||
Utilities for Flarum Language Packs
This package provides useful utilities for Flarum Language Packs.
Installation
You can install this package using Composer:
composer require flarum-lang/utils
Usage
LanguagePackWithVariants
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',
]),
];