Class LocaleColumns
Inheritance
LocaleColumns
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 reader.GetFieldIndex("Column Header", isTryGet: true) to check for a column with a matching name.
|
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 reader.GetField .
|
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 writer.WriteField("Header Title") .
|
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 writer.WriteField(string.Empty) .
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.