2017 © Pedro Peláez
 

library morphos-blade

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

image

wapmorgan/morphos-blade

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

  • Tuesday, February 13, 2018
  • by wapmorgan
  • Repository
  • 2 Watchers
  • 22 Stars
  • 642 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 11 Versions
  • 15 % Grown

The README.md

MorphosBlade

На русском языке - README-ru., (*1)

Composer package Latest Stable Version License, (*2)

Adds a @plural, @name, @numeral, @ordinal and @money tags to Laravel's Blade templating engine for Russian pluralization and declenation., (*3)

<div>
@plural(252, 'новость') от @name('Иванов Иван Иванович', 'родительный')
@numeral(565, 'сообщение', 'n') и @money(123.50, '₽') за Ваше отсутствие.
Это Ваше @ordinal(351, 'n') посещение нашего сайта за сегодня!
</div>

Will be compiled in, (*4)

<div>
252 новости от Иванова Ивана Ивановича
пятьсот шестьдесят пять сообщений и 123 рубля 50 копеек за Ваше отсутствие
Это Ваше триста пятьдесят первое посещение нашего сайта за сегодня!
</div>

Most popular directives:, (*5)

  • @plural(count, noun) - Get plural form of word. Just pass count of objects and noun., (*6)

    @plural(244, 'элемент')
    
  • @money(value, currency) - Get money formatted as text string. Just pass value and currency (₽ or $ or € or ₴ or £)., (*7)

    @money(1000.10, '$')
    
  • @numeral(number) - Get numeral of a number. Just pass number., (*8)

    @numeral(344)
    
  • @ordinal(number) - Get ordinal of a number. Just pass number., (*9)

    @ordinal(500)
    
  • @name(name, case) - Get any case of fullname with gender detection. Just pass name and case (именительный, родительный, дательный, винительный, творительный, предложный), (*10)

    @name('Коленко Сергей Аркадьевич', 'dativus')
    

Additional directives:, (*11)

  • @name(name, gender, case) - Get any case of fullname. Just pass name, gender (f or m or null) and case (именительный, родительный, дательный, винительный, творительный, предложный). Use this directive if middle name is unknown and gender detection can make wrong decision., (*12)

    @name('Филимонов Игорь', 'm', 'dativus')
    
  • @numeral(number, gender) - Get numeral of a number. Just pass number and gender (m or f or n) to use correct form of gender-dependent words (один/одно/одна, два/две)., (*13)

    @numeral(121, 'n')
    
  • @numeral(number, noun) - Get numeral and a pluralized noun. Just pass number and noun. It's just a shortcut to @numeral(3) @plural(3, 'поле'), (*14)

    @numeral(3, 'поле')
    
  • @numeral(number, noun, gender) - Get numeral and a pluralized noun. Just pass number, noun and gender (m or f or n) to use correct form of gender-dependent words (один/одно/одна, два/две)., (*15)

    @numeral(101, 'сообщение', 'n')
    
  • @ordinal(number, gender) - Get ordinal of a number. Just pass number and gender (m or f or n) to use correct form of gender-dependent words (первый/первое/первая, второй/второе/вторая, etc)., (*16)

    @ordinal(351, 'n')
    

Installation

Get the Package

composer require wapmorgan/morphos-blade

Register the Service Provider

Open up your app.php in your config folder, and add the following line to your providers list like:, (*17)

'providers' => array(
    ...
    morphos\MorphosBladeProvider::class
)

The Versions

13/02 2018

dev-master

9999999-dev

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

  Sources   Download

MIT

The Requires

 

blade morphology

15/08 2017

1.6.0

1.6.0.0

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

  Sources   Download

MIT

The Requires

 

blade morphology

21/04 2017

1.5.0

1.5.0.0

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

  Sources   Download

MIT

The Requires

 

blade morphology

31/03 2017

1.4.1

1.4.1.0

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade for Russian pluralization and declenation.

  Sources   Download

MIT

The Requires

 

blade morphology

26/02 2017

1.4.0

1.4.0.0

Adds @plural, @name, @numeral, @ordinal and @money tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

20/02 2017

1.3.2

1.3.2.0

Adds @plural, @name, @numeral and @money tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

08/02 2017

1.3.1

1.3.1.0

Adds @plural, @name, @numeral and @money tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

04/02 2017

1.3.0

1.3.0.0

Adds @plural, @name, @numeral and @money tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

03/02 2017

1.2.0

1.2.0.0

Adds @plural, @name and @numeral tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

03/02 2017

1.1.0

1.1.0.0

Adds @plural and @name tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology

02/02 2017

1.0.0

1.0.0.0

Adds @plural and @name tags to Blade.

  Sources   Download

MIT

The Requires

 

blade morphology