Class Placeholder | Localization | 0.9.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class Placeholder

    A placeholder is the part of a format string between the { braces }.

    Inheritance
    Object
    FormatItem
    Placeholder
    Inherited Members
    FormatItem.baseString
    FormatItem.endIndex
    FormatItem.SmartSettings
    FormatItem.startIndex
    FormatItem.RawText
    Namespace: UnityEngine.Localization.SmartFormat.Core.Parsing
    Syntax
    public class Placeholder : FormatItem
    Examples

    For example, in "{Items.Length,10:choose(1,2,3):one|two|three}", the Alignments is "10", the Selectors are "Items" and "Length", the FormatterName is "choose", the FormatterOptions is "1,2,3", and the Format is "one|two|three".

    Constructors

    Placeholder(SmartSettings, Format, Int32, Int32)

    Declaration
    public Placeholder(SmartSettings smartSettings, Format parent, int startIndex, int nestedDepth)
    Parameters
    Type Name Description
    SmartSettings smartSettings
    Format parent
    Int32 startIndex
    Int32 nestedDepth

    Fields

    parent

    Declaration
    public readonly Format parent
    Field Value
    Type Description
    Format

    Properties

    Alignment

    Declaration
    public int Alignment { get; set; }
    Property Value
    Type Description
    Int32

    Format

    Declaration
    public Format Format { get; set; }
    Property Value
    Type Description
    Format

    FormatterName

    Declaration
    public string FormatterName { get; set; }
    Property Value
    Type Description
    String

    FormatterOptions

    Declaration
    public string FormatterOptions { get; set; }
    Property Value
    Type Description
    String

    NestedDepth

    Declaration
    public int NestedDepth { get; set; }
    Property Value
    Type Description
    Int32

    Selectors

    Declaration
    public List<Selector> Selectors { get; }
    Property Value
    Type Description
    List<Selector>

    Methods

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    FormatItem.ToString()
    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