Class PluralForm | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class PluralForm

    Used to determine what version of a translated string should be used when dealing with plurals.

    Inheritance
    System.Object
    PluralForm
    Namespace: UnityEngine.Localization
    Syntax
    public class PluralForm

    Properties

    Evaluator

    Declaration
    public PluralForm.EvaluatePluralDelegate Evaluator { get; set; }
    Property Value
    Type Description
    PluralForm.EvaluatePluralDelegate

    NumberOfPlurals

    Declaration
    public int NumberOfPlurals { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    CreatePluralForm(String)

    Returns a new PluralForm for the locale Code.

    Declaration
    public static PluralForm CreatePluralForm(string code)
    Parameters
    Type Name Description
    System.String code
    Returns
    Type Description
    PluralForm

    PluralForm or null if one could not be found.

    Evaluate(Int32)

    Returns the plural index to use for the value. Plural index values are based on the GNU Gettext standard http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms

    Declaration
    public virtual int Evaluate(int value)
    Parameters
    Type Name Description
    System.Int32 value
    Returns
    Type Description
    System.Int32

    Index of the plural form to use.

    GetPluralForm(String)

    Returns a PluralForm from the local cache for the code.

    Declaration
    public static PluralForm GetPluralForm(string code)
    Parameters
    Type Name Description
    System.String code

    locale code.

    Returns
    Type Description
    PluralForm
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023