Class ColumnMapping | Localization | 0.7.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class ColumnMapping

    Inheritance
    Object
    ColumnMapping
    Namespace: UnityEditor.Localization.Plugins.Google.Columns
    Syntax
    public static class ColumnMapping

    Methods

    AddLocaleMappings(IList<SheetColumn>)

    Creates a LocaleColumn for any project Locale that is missing from the columns.

    Declaration
    public static void AddLocaleMappings(IList<SheetColumn> columns)
    Parameters
    Type Name Description
    IList<SheetColumn> columns

    The existing column that will also be appeneded with any missing Locale's

    CreateDefaultMapping()

    Creates a KeyColumn at "A" and then a LocaleColumn for each Locale in the project, each mapped to a unique Column.

    Declaration
    public static List<SheetColumn> CreateDefaultMapping()
    Returns
    Type Description
    List<SheetColumn>

    CreateMappingsFromColumnNames(IList<String>, IList<String>)

    Creates columns by attempting to match to expected column names(case insensitive).
    The following names are checked:
    "key" => KeyColumn
    "key id" =>
    Project Locale's name, ToString() or Code => LocaleColumn

    Declaration
    public static List<SheetColumn> CreateMappingsFromColumnNames(IList<string> columNames, IList<string> unusedNames = null)
    Parameters
    Type Name Description
    IList<String> columNames

    The column names to create mappings for.

    IList<String> unusedNames

    Optional list that can be populated with the names that a match could not be found for.

    Returns
    Type Description
    List<SheetColumn>

    GetNextAvailableColumn(HashSet<Int32>)

    Returns the next available sheet column.

    Declaration
    public static string GetNextAvailableColumn(HashSet<int> reservedColumIds)
    Parameters
    Type Name Description
    HashSet<Int32> reservedColumIds

    The reserved column ids where "A" = 0, "B" = 1 etc. The found available column will also be added.

    Returns
    Type Description
    String

    GetNextAvailableColumn(IList<SheetColumn>)

    Declaration
    public static string GetNextAvailableColumn(IList<SheetColumn> columns)
    Parameters
    Type Name Description
    IList<SheetColumn> columns
    Returns
    Type Description
    String

    GetNextAvailableColumn(String[])

    Declaration
    public static string GetNextAvailableColumn(params string[] reservedColumns)
    Parameters
    Type Name Description
    String[] reservedColumns
    Returns
    Type Description
    String
    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