PHP code example of noroman / pluralization
1. Go to this page and download the library: Download noroman/pluralization library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
noroman / pluralization example snippets
luralization\Driver\Ru;
$params = [
'яблоко', // 1
'яблока', // 2
'яблок', // 8
// для десятичных дробей
'яблока', // 12.3
];
$ru = new Ru($params);
echo $number . ' ' . $ru->plural($number);
echo "\n";
echo $ru->pluralFull($number);
echo "\n";