Class LocaleColumns
Represents the localized value and Comment metadata from a StringTable.
Implements
Inherited Members
Namespace: UnityEditor.Localization.Plugins.CSV.Columns
Assembly: Unity.Localization.Editor.dll
Syntax
[Serializable]
public class LocaleColumns : CsvColumns, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
CommentFieldName | The comments field name when exporting and importing. When importing this name will be checked against the headers to determine if the field is present in the CSV data. |
FieldName | The value field name when exporting and importing. When importing this name will be checked against the headers to determine if the field is present in the CSV data. |
IncludeComments | Should the Comment metadata be exported as a separate column? |
LocaleIdentifier | Used to extract the StringTable from the StringTableCollection when importing and exporting. |
Methods
Name | Description |
---|---|
ReadBegin(StringTableCollection, CsvReader) | Called when reading a CSV file column header row.
This call should be used to determine which column indexes to use during ReadRow(SharedTableEntry, CsvReader).
Use |
ReadEnd(StringTableCollection) | Called when the CSV file has been imported. This can be used to perform any required cleanup. |
ReadRow(SharedTableEntry, CsvReader) | Called when reading each row of the CSV file. Unity recommends to store the indexes of the rows you are
interested in during ReadBegin(StringTableCollection, CsvReader) and then use them to access the row using |
SetDefaultFieldNames() | Sets the field names to their default values. The default values are UnityEngine.Localization.LocaleIdentifier.ToString() for FieldName and FieldName + " Comments" for CommentFieldName. |
WriteBegin(StringTableCollection, CsvWriter) | Called when writing the header row of the CSV file.
Each column that will be written to during WriteRow(SharedTableEntry, IList<StringTableEntry>, CsvWriter) should have
its column header written here using |
WriteRow(SharedTableEntry, IList<StringTableEntry>, CsvWriter) | Called when writing each row of the CSV file. This is called in the same order as WriteBegin(StringTableCollection, CsvWriter) and expects each
column that was written to be populated each time. If a column will not always contain a value, you can use |