Namespace UnityEngine.Localization.SmartFormat.Extensions
Classes
ChooseFormatter
Provides the ability to add logic to a Smart String by selecting an output using a provided set of choices.
ConditionalFormatter
Provides conditional formatting on any placeholder that contains a "|" (pipe character) after the ":".
For example: {0:cond:>10?Greater Than 10|=10?Equals to 10|Less than 10}
CustomPluralRuleProvider
Use this class to provide custom plural rules to Smart.Format
DefaultFormatter
Do the default formatting, same logic as "String.Format".
DefaultSource
Provides the ability to reference an argument by its index, the same as String.Format.
DictionarySource
Provides the ability to extract an object with a matching Key from an IDictionary or IDictionary<string, object>.
GlobalVariablesSource
Can be used to provide global values that do not need to be passed in as arguments when formatting a string. The smart string should take the format {groupName.variableName}. e.g {global.player-score}. Note: The group name and variable names must not contain any spaces.
IsMatchFormatter
Formatter with evaluation of regular expressions.
ListFormatter
If the source value is an array (or supports ICollection), then each item will be custom formatted. Syntax:
- "format|spacer"
- "format|spacer|last spacer"
- "format|spacer|last spacer|two spacer"
PersistentVariablesSource
Can be used to provide global or local values that do not need to be passed in as arguments when formatting a string. The smart string should take the format {groupName.variableName}. e.g {global.player-score}. Note: The group name and variable names must not contain any spaces.
PluralLocalizationFormatter
Provides the ability to handle plural forms.
ReflectionSource
Provides the ability to select objects using reflection.
SubStringFormatter
Formatter to access part of a string.
TemplateFormatter
Template Formatter allows for registering reusable templates, and use them by name.
TimeFormatter
Provides the ability to format a DateTime or TimeSpan object.
ValueTupleSource
Provides the ability to iterate through a Tuple values.
XElementFormatter
Provides the ability to write the contents of XElement values into a format string.
XmlSource
Provides the ability to extract elements from an XElement object.
Structs
PersistentVariablesSource.ScopedUpdate
Encapsulates a BeginUpdating() and EndUpdating() call.
Enums
SubStringFormatter.SubStringOutOfRangeBehavior
Specify behavior when start index and/or length is out of range