Class Localization
OptimaJet.Workflow.Core.Model.Localization
Represents a collection of Translation entries that can be stored in ProcessDefinition.Localization or used as an ILocalizationProvider.
Namespace: OptimaJet.Workflow.Core.Model
public class Localization : List<Translation>, IList<Translation>, ICollection<Translation>, IReadOnlyList<Translation>, IReadOnlyCollection<Translation>, IEnumerable<Translation>, IList, ICollection, IEnumerable, ILocalizationProviderType Hierarchy
Constructors
public Localization() #Initializes an empty collection of Translation entries.
public Localization(IEnumerable<Translation> collection) #Initializes a collection that contains the specified Translation entries.
Parameters
Name
Type
Description
Methods
public List<Translation> GetAll(string schemeCode = "") #Returns the Translation entries exposed as predefined translations in the Workflow Designer.
Parameters
Name
Type
Description
schemeCodeStringThe scheme code. This collection is not scoped by scheme code, so the value is ignored.
Returns
Type
Description
List<Translation>The current Localization instance containing every Translation entry.
public Translation? Get(string name, LocalizeType type, CultureInfo culture) #Gets a Translation for the specified Translation.ObjectName and Translation.Type, preferring an entry whose Translation.Culture matches CultureInfo.Name over the first entry whose Translation.IsDefault is true.
Parameters
Name
Type
Description
cultureCultureInfoThe culture whose CultureInfo.Name is matched against Translation.Culture without regard to case.
Returns
Type
Description
TranslationThe first matching Translation whose Translation.Culture matches CultureInfo.Name; otherwise, the first matching Translation whose Translation.IsDefault is true; otherwise, null.