1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Declination of words after numerals

Discussion in 'Low-Quality / Outdated' started by AlexBrin, Jul 13, 2017.

  1. AlexBrin

    AlexBrin Shog Chips

    Messages:
    0
    GitHub:
    alexbrin
    This is not important, but it will help make your plugin more quality and raise its "level"

    There are 2 examples: for Russian and English
    Source code and description on GitHub

    PHP:
    <?php

        
    require_once 'src/AlexBrin/Utils/aUtils.php';
        use 
    AlexBrin\Utils\aUtils;

        
    $example_ru '@3_яблоко|яблока|яблок@';
        
    $example_en '@3_apple|apples|apples@';

        echo 
    aUtils::getDeclination($example_ru); // Вернет "3 яблока"
        
    echo '<br>';
        echo 
    aUtils::getDeclination($example_en); // return "3 apples

    ?>
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Please use Virions instead of asking people to copy your code.
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.