docs.unity3d.com
    Show / Hide Table of Contents

    Class CustomPluralRuleProvider

    Use this class to provide custom plural rules to Smart.Format

    Inheritance
    Object
    CustomPluralRuleProvider
    Namespace: UnityEngine.Localization.SmartFormat.Extensions
    Syntax
    public class CustomPluralRuleProvider : IFormatProvider

    Constructors

    CustomPluralRuleProvider(PluralRules.PluralRuleDelegate)

    Creates a new instance of the plural rule provider.

    Declaration
    public CustomPluralRuleProvider(PluralRules.PluralRuleDelegate pluralRule)
    Parameters
    Type Name Description
    UnityEngine.Localization.SmartFormat.Utilities.PluralRules.PluralRuleDelegate pluralRule

    The plural rule to use for this provider.

    Methods

    GetFormat(Type)

    Returns the formatter when formatType is CustomPluralRuleProvider, otherwise returns null.

    Declaration
    public object GetFormat(Type formatType)
    Parameters
    Type Name Description
    Type formatType
    Returns
    Type Description
    Object

    GetPluralRule()

    Returns the custom plural rule delegate.

    Declaration
    public PluralRules.PluralRuleDelegate GetPluralRule()
    Returns
    Type Description
    UnityEngine.Localization.SmartFormat.Utilities.PluralRules.PluralRuleDelegate
    Back to top
    Terms of use
    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