Translation

data class Translation(val tableName: String, val fieldName: String, val language: LanguageCode, val translation: String, val recordId: String? = null, val recordSubId: String? = null, val fieldValue: String? = null)(source)

Provides translations for customer-facing dataset values in languages other than the one used in the dataset.

This class represents a record in the translations.txt file.

Constructors

Link copied to clipboard
constructor(tableName: String, fieldName: String, language: LanguageCode, translation: String, recordId: String? = null, recordSubId: String? = null, fieldValue: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "field_name")
val fieldName: String

Name of the field to be translated.

Link copied to clipboard
@SerialName(value = "field_value")
val fieldValue: String?

Instead of defining which record should be translated, this field can be used to define the value which should be translated. When used, the translation will be applied when the field identified by field_name contains the exact same value defined in field_value.

Link copied to clipboard
@SerialName(value = "language")
val language: LanguageCode

Language of translation.

Link copied to clipboard
@SerialName(value = "record_id")
val recordId: String?

Defines the record that corresponds to the field to be translated. The value in record_id must be the first or only field of the table's primary key.

Link copied to clipboard
@SerialName(value = "record_sub_id")
val recordSubId: String?

Helps the record that contains the field to be translated when the table doesn't have a unique ID. The value in record_sub_id is the second field of the table's primary key.

Link copied to clipboard
@SerialName(value = "table_name")
val tableName: String

Defines the table that contains the field to be translated.

Link copied to clipboard
@SerialName(value = "translation")
val translation: String

Translated value.