Class Translation
OptimaJet.Workflow.Core.Model.Translation
Represents a translation entry that maps a scheme object's internal name and LocalizeType to culture-specific text.
Namespace: OptimaJet.Workflow.Core.Model
public sealed class TranslationConstructors
public Translation() #Initializes a new translation entry with default property values.
public Translation(string name, string value, LocalizeType type, string culture, bool isDefault = false) #Initializes a translation entry for a scheme object.
Parameters
Name
Type
Description
isDefaultBooleanThe value to assign to Translation.IsDefault. Use true to make the entry a fallback when no culture-specific entry matches.
Properties
public string ObjectName { get; set; } #Gets or sets the internal name of the scheme object being translated.
public string Value { get; set; } #Gets or sets the culture-specific text for the scheme object.
[JsonConverter(typeof(StringEnumConverter))] [JsonConverter(typeof(SystemStringEnumConverter<LocalizeType>))] public LocalizeType Type { get; set; } #Gets or sets the LocalizeType that identifies the kind of scheme object.
public string Culture { get; set; } #Gets or sets the culture name used for this translation entry.
public bool IsDefault { get; set; } #Gets or sets a value indicating whether this entry is the fallback when no entry matches the requested culture.
Methods
public static Translation Create(string name, string type, string culture, string value, string isDefault) #Parameters
Name
Type
Description
Returns
Type
Description
TranslationA Translation initialized from the supplied values.
Remarks
If
type cannot be parsed, LocalizeType.Command is used. If isDefault cannot be parsed, false is used.public static Translation Create(string name, LocalizeType type, string culture, string value, bool isDefault = false) #Creates a Translation for the culture named by
culture.Parameters
Name
Type
Description
isDefaultBooleanThe value to assign to Translation.IsDefault. Use true to make the entry a fallback when no culture-specific entry matches.
Returns
Type
Description
TranslationA Translation initialized from the supplied values.
public static Translation Create(string name, LocalizeType type, CultureInfo culture, string value, bool isDefault = false) #Creates a Translation for
culture.Parameters
Name
Type
Description
isDefaultBooleanThe value to assign to Translation.IsDefault. Use true to make the entry a fallback when no culture-specific entry matches.
Returns
Type
Description
TranslationA Translation initialized from the supplied values.
public Translation Clone() #Creates a shallow copy of this translation entry.
Returns
Type
Description
TranslationA shallow copy of this Translation.