Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.66 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.66 KB

Utilities for Flarum Language Packs

Latest Stable Version Latest Unstable Version License Total Downloads Monthly Downloads

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',
    ]),
];

Links