vault/classes/Maikuolan/L10N.php
public function getPlural($Number, $String)
    {
        if (isset($this->Data[$String])) {
            $Choices = $this->Data[$String];
            $IntegerRule = $this->IntegerRule;
            $FractionRule = $this->FractionRule;
        } elseif (isset($this->Fallback[$String])) {
            $Choices = $this->Fallback[$String];
            $IntegerRule = $this->FallbackIntegerRule;
            $FractionRule = $this->FallbackFractionRule;
        } else {
            return '';
        }
        if (!is_array($Choices)) {
            return $Choices;
        }
        if (is_float($Number)) {
            $Choice = $this->{$FractionRule}($Number);
        } elseif (is_int($Number)) {
            $Choice = $this->{$IntegerRule}($Number);
        } else {
            $Choice = 0;
        }
        if (isset($Choices[$Choice])) {
            return $Choices[$Choice];
        }
        return isset($Choices[0]) ? $Choices[0] : '';
    }
public function getPlural($Number, $String)
    {
        if (isset($this->Data[$String])) {
            $Choices = $this->Data[$String];
            $IntegerRule = $this->IntegerRule;
            $FractionRule = $this->FractionRule;
        } elseif (isset($this->Fallback[$String])) {
            $Choices = $this->Fallback[$String];
            $IntegerRule = $this->FallbackIntegerRule;
            $FractionRule = $this->FallbackFractionRule;
        } else {
            return '';
        }
        if (!is_array($Choices)) {
            return $Choices;
        }
        if (is_float($Number)) {
            $Choice = $this->{$FractionRule}($Number);
        } elseif (is_int($Number)) {
            $Choice = $this->{$IntegerRule}($Number);
        } else {
            $Choice = 0;
        }
        if (isset($Choices[$Choice])) {
            return $Choices[$Choice];
        }
        return isset($Choices[0]) ? $Choices[0] : '';
    }
public function getPlural ( $ Number , $ String ) { if ( isset ( $ this -> Data [ $ String ] ) ) { $ Choices = $ this -> Data [ $ String ] ; $ IntegerRule = $ this -> IntegerRule ; $ FractionRule = $ this -> FractionRule ; } elseif ( isset ( $ this -> Fallback [ $ String ] ) ) { $ Choices = $ this -> Fallback [ $ String ] ; $ IntegerRule = $ this -> FallbackIntegerRule ; $ FractionRule = $ this -> FallbackFractionRule ; } else { return '' ; } if ( ! is_array ( $ Choices ) ) { return $ Choices ; } if ( is_float ( $ Number ) ) { $ Choice = $ this -> { $ FractionRule } ( $ Number ) ; } elseif ( is_int ( $ Number ) ) { $ Choice = $ this -> { $ IntegerRule } ( $ Number ) ; } else { $ Choice = 0 ; } if ( isset ( $ Choices [ $ Choice ] ) ) { return $ Choices [ $ Choice ] ; } return isset ( $ Choices [ 0 ] ) ? $ Choices [ 0 ] : '' ; }
Fetch an L10N string from a range of possible plural forms.

@param int|float $Number The quantity of the subject.
@param string $String Which L10N strings we're fetching from.
@return string The appropriate plural form as determined.
Fetch an L10N string from a range of possible plural forms .