Kanzi  3.9.7
Localization API
CsvImporter Class Reference

An example localization plugin for importing localization tables from CSV (Comma Separated Value) files. More...

Inheritance diagram for CsvImporter:
[legend]
Collaboration diagram for CsvImporter:
[legend]

Public Attributes

override string Description => "Imports the localization table from a CSV file."
 Gets the description of the CSV importer command. More...
 
override string Name => "Import CSV"
 Gets the name of the CSV importer command. More...
 
- Public Attributes inherited from AbstractLocalizationImporter
bool InvalidatesUndoHistory => true
 Indicates that this command breaks the undo chain. More...
 

Protected Member Functions

override IEnumerable< LocalizationTableRowImport (string localizationTableName)
 Imports a localization table from a CSV file prompted from the user. More...
 

Additional Inherited Members

- Properties inherited from AbstractLocalizationImporter
abstract string Description [get]
 Gets the description of the plugin command. More...
 
virtual string DisplayName [get]
 Gets the display name of the plugin command. More...
 
abstract string Name [get]
 Gets the name of the plugin command. More...
 
KanziStudio Studio [get]
 Gets the KanziStudio object, which provides the entry point for operating with the Kanzi Studio plugin API. More...
 

Detailed Description

An example localization plugin for importing localization tables from CSV (Comma Separated Value) files.

This class implements the abstract class AbstractLocalizationImporter.

Member Function Documentation

override IEnumerable<LocalizationTableRow> Import ( string  localizationTableName)
inlineprotectedvirtual

Imports a localization table from a CSV file prompted from the user.

Parameters
localizationTableNameThe name of the localization table where the rows should be imported to.
Returns
A list of localization table rows.
Exceptions
System.IO.InvalidDataExceptionThe selected CSV file is malformed. Make sure there are correct number of columns in each row.
System.InvalidOperationExceptionResource name cannot be null for a text resource.

Implements AbstractLocalizationImporter.

Member Data Documentation

override string Description => "Imports the localization table from a CSV file."

Gets the description of the CSV importer command.

Plugin command description.

override string Name => "Import CSV"

Gets the name of the CSV importer command.

Plugin command name.