# Class Localizer OptimaJet.Workflow.Core.Utils.Localizer Helper for work with localization. Namespace: [OptimaJet.Workflow.Core.Utils](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils/) ```csharp public class Localizer ``` ## Constructors `public Localizer(WorkflowRuntime runtime)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | | `public Localizer(params ILocalizationProvider[] sources)` ### Parameters | Name | Type | Description | | --- | --- | --- | | `sources` | `ILocalizationProvider[]` | | ## Properties `public string this[string name, LocalizeType type, CultureInfo? culture = null] { get; }` Get the localized name in specific culture from bound sources. ## Methods `public string GetLocalizedName(string name, LocalizeType type, CultureInfo? culture = null)` Get the localized name in specific culture from bound sources. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | System name. See [Translation.ObjectName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/Translation/) | | `type` | `LocalizeType` | Localize type of name | | `culture` | `CultureInfo` | Desired culture. If null then used [CultureInfo.CurrentCulture](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.currentculture) | ### Returns | Type | Description | | --- | --- | | `String` | Localized name if exists, else input `name` | `public Translation? GetTranslation(string name, LocalizeType type, CultureInfo? culture = null)` Get the localize in specific culture from bound sources. ### Parameters | Name | Type | Description | | --- | --- | --- | | `name` | `String` | System name. See [Translation.ObjectName](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Model/Translation/) | | `type` | `LocalizeType` | Localize type of name | | `culture` | `CultureInfo` | Desired culture. If null then used [CultureInfo.CurrentCulture](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.currentculture) | ### Returns | Type | Description | | --- | --- | | `Translation` | Return one of: first non default localize; default first value of localization; null | `public Localizer FromScheme(string schemeCode, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Localizer` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Localizer FromScheme(string schemeCode, string? tenantId, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme | | `tenantId` | `String` | Tenant identifier | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Localizer` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Localizer FromScheme(Guid schemeId, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeId` | `Guid` | Id of the scheme | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Localizer` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Localizer FromProcess(Guid processId, bool isAppend = false)` Bind process for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processId` | `Guid` | Id of the process instance | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Localizer` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Localizer FromRuntime(WorkflowRuntime runtime, bool isAppend = false)` Bind process for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | Workflow runtime instance | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Localizer` | New localizer with expanded source for search a localized name | `public Task FromSchemeAsync(string schemeCode, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Task` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Task FromSchemeAsync(string schemeCode, string? tenantId, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | Code of the scheme | | `tenantId` | `String` | Tenant identifier | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Task` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Task FromSchemeAsync(Guid schemeId, bool isAppend = false)` Bind scheme for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeId` | `Guid` | | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Task` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | `public Task FromProcessAsync(Guid processId, bool isAppend = false)` Bind process for getting to inner scheme localization source. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processId` | `Guid` | Id of the process instance | | `isAppend` | `Boolean` | Appends a value to the end of the sequence | ### Returns | Type | Description | | --- | --- | | `Task` | New localizer with expanded source for search a localized name | ### Exceptions | Type | Description | | --- | --- | | `ArgumentNullException` | Runtime is null | [Previous FixedSizedQueue](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils/FixedSizedQueue-T/) [Next IOneOf](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Utils.OneOf/IOneOf/)