Provides the ability to handle plural forms.
Inheritance
PluralLocalizationFormatter
[Serializable]
public class PluralLocalizationFormatter : FormatterBase, IFormatter, ISerializationCallbackReceiver, IFormatterLiteralExtractor
Constructors
Creates a new instance of the formatter.
Declaration
public PluralLocalizationFormatter()
Properties
Declaration
public override string[] DefaultNames { get; }
Property Value
Overrides
The default language to use for plurals if one can not be found.
Declaration
public string DefaultTwoLetterISOLanguageName { get; set; }
Property Value
Methods
Returns the plural rule for the formatting info.
Declaration
protected virtual PluralRules.PluralRuleDelegate GetPluralRule(IFormattingInfo formattingInfo)
Parameters
Returns
Type |
Description |
UnityEngine.Localization.SmartFormat.Utilities.PluralRules.PluralRuleDelegate |
|
Writes the current value to the output, using the specified format.
IF this extension cannot write the value, returns false, otherwise true.
Declaration
public override bool TryEvaluateFormat(IFormattingInfo formattingInfo)
Parameters
Returns
Overrides
Ignores the format arguments and writes every possible literal value.
This is used to extract all possible values so that we can determine the distinct characters for font generation etc.
Declaration
public void WriteAllLiterals(IFormattingInfo formattingInfo)
Parameters
Implements