CSV file format
- Last UpdatedDec 17, 2018
- 2 minute read
The CSV file format for import/export has the following columns:
Application, ResourceGroup, ResourceName, AlwaysUseDefault, DefaultValue, Value, OverrideValue, LanguageName, ParentLanguageName, Comment
-
The last four columns are optional and they can have no values, but make sure all the columns are specified in the file.
-
A blank LanguageName means it will assume the default language which is English.
-
AlwaysUseDefault should be true or false and is only processed when you create a ResourceGroup. ResourceGroup is unique for each application and owns a collection of InvariantResource objects, which define the set of defined languages.
-
If the override argument is passed to the utility along with the import command, then only the "OverrideValue" column is considered when updating the database. It will either set the override value or clear it.
-
The “DefaultValue” column always shows the Default string as a reference. It is ignored on import.
Follow these guidelines when you import the CSV file for localization
-
Refer to the following articles to find your appropriate Language Code:
https://msdn.microsoft.com/en-us/library/ms533052(v=vs.85).aspx (outdated)
https://msdn.microsoft.com/en-us/library/cc233965.aspx
-
The CSV must define all the required headers and columns in the proper order. A comma(,) is the separator. All values must be in double quotes with no spaces before or after the quotes. Double quotes within values need to be escaped with another double quote. The file must be in UTF-8 format.
-
Only one ResourceGroup/Language can be defined in a CSV file and processed per import.
-
A parent language must be defined before a child language (dialect) is imported.
-
Import provides an “override” capability where an override value can be specified for any resource language value (including invariant). The override value is only set if the resource already exists and if “do override” is specified. The original resource value is not modified if doing an override.
NOTE: If the AlwaysUseDefault flag is set for a resource, you cannot override its value. However, you can set an override value to change a value in an existing language. The language must already exist in the repository to override a value.