Assembly: OptimaJet.Workflow.Core

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.

public class Localization : List<Translation>, IList<Translation>, ICollection<Translation>, IReadOnlyList<Translation>, IReadOnlyCollection<Translation>, IEnumerable<Translation>, IList, ICollection, IEnumerable, ILocalizationProvider

Type 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
collection
IEnumerable<Translation>
The Translation entries to copy into the collection.

Methods

public List<Translation> GetAll(string schemeCode = "") #
Returns the Translation entries exposed as predefined translations in the Workflow Designer.

Parameters

Name
Type
Description
schemeCode
String
The 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
name
String
The internal object name to match case-sensitively against Translation.ObjectName.
type
LocalizeType
The LocalizeType to match against Translation.Type.
culture
CultureInfo
The culture whose CultureInfo.Name is matched against Translation.Culture without regard to case.

Returns

Type
Description
Translation
The first matching Translation whose Translation.Culture matches CultureInfo.Name; otherwise, the first matching Translation whose Translation.IsDefault is true; otherwise, null.