# OpcServerGlobalization Members

> Reference: Provides mechanisms to control the localization of data and information.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcServerGlobalization</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx.server">Opc.UaFx.Server</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
</dl>

## Methods

### AddResource

<span class="api-meta">2 overloads</span>

| Overload | Description |
|---|---|
| [AddResource(string, string, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresource-system-string-system-string-system-string) | Adds or overrides the specified resource `value` to/in the resources of the culture identified by `cultureName` using the `key` to identify the resource entry. |
| [AddResource(CultureInfo, string, string)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresource-system-globalization-cultureinfo-system-string-system-string) | Adds or overrides the specified resource `value` to/in the resources of the `culture` specified using the `key` to identify the resource entry. |

#### AddResource(string, string, string)

Adds or overrides the specified resource `value` to/in the resources of the culture identified by `cultureName` using the `key` to identify the resource entry.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResource(string cultureName, string key, string value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResource(cultureName As String, key As String, value As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `cultureName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name) of a well known non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `key` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The identifier of the resource `value`. |
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) value of the resource. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `cultureName` is an empty string or the [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) referred to by `cultureName` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `cultureName` is a null reference (Nothing in Visual Basic). |
| [CultureNotFoundException](https://learn.microsoft.com/dotnet/api/system.globalization.culturenotfoundexception) | The culture specified by `cultureName` does not refer to a well known culture. |

#### AddResource(CultureInfo, string, string)

Adds or overrides the specified resource `value` to/in the resources of the `culture` specified using the `key` to identify the resource entry.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResource(CultureInfo culture, string key, string value)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResource(culture As CultureInfo, key As String, value As String)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `culture` | [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) | The non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `key` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The identifier of the resource `value`. |
| `value` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [string](https://learn.microsoft.com/dotnet/api/system.string) value of the resource. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `culture` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `culture` is a null reference (Nothing in Visual Basic). |

### AddResources

<span class="api-meta">8 overloads</span>

| Overload | Description |
|---|---|
| [AddResources(string, params KeyValuePair&lt;string, string&gt;\[\])](#addresources-system-string-system-collections-generic-keyvaluepair-of-system-string-system-string-array) | Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`. |
| [AddResources(CultureInfo, params KeyValuePair&lt;string, string&gt;\[\])](#addresources-system-globalization-cultureinfo-system-collections-generic-keyvaluepair-of-system-string-system-string-array) | Adds or overrides the specified `resources` to/in the resources of the `culture` specified. |
| [AddResources(string, IDictionary&lt;string, string&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-string-system-collections-generic-idictionary-of-system-string-system-string) | Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`. |
| [AddResources(CultureInfo, IDictionary&lt;string, string&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-globalization-cultureinfo-system-collections-generic-idictionary-of-system-string-system-string) | Adds or overrides the specified `resources` to/in the resources of the `culture` specified. |
| [AddResources(string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-string-system-collections-generic-ienumerable-of-system-collections-generic-keyvaluepair-of-system-string-system-string) | Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`. |
| [AddResources(CultureInfo, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-globalization-cultureinfo-system-collections-generic-ienumerable-of-system-collections-generic-keyvaluepair-of-system-string-system-string) | Adds or overrides the specified `resources` to/in the resources of the `culture` specified. |
| [AddResources(string, ResourceManager)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-string-system-resources-resourcemanager) | Adds or overrides the resources in the `resourceManager` to/in the resources of the culture identified by `cultureName`. |
| [AddResources(CultureInfo, ResourceManager)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#addresources-system-globalization-cultureinfo-system-resources-resourcemanager) | Adds or overrides the resources in the `resourceManager` to/in the resources of the `culture` specified. |

#### AddResources(string, params KeyValuePair&lt;string, string&gt;\[\])

Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    string cultureName,
    params KeyValuePair<string, string>[] resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    cultureName As String,
    ParamArray resources As KeyValuePair(Of String, String)())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `cultureName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name) of a well known non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | params [KeyValuePair](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt;[] | An array of [KeyValuePair&lt;TKey, TValue&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) objects there the [Key](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.key) identifies the resource entry and its resource [Value](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.value). |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `cultureName` is an empty string or the [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) referred to by `cultureName` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `cultureName` or `resources` is a null reference (Nothing in Visual Basic). |
| [CultureNotFoundException](https://learn.microsoft.com/dotnet/api/system.globalization.culturenotfoundexception) | The culture specified by `cultureName` does not refer to a well known culture. |

#### AddResources(CultureInfo, params KeyValuePair&lt;string, string&gt;\[\])

Adds or overrides the specified `resources` to/in the resources of the `culture` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    CultureInfo culture,
    params KeyValuePair<string, string>[] resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    culture As CultureInfo,
    ParamArray resources As KeyValuePair(Of String, String)())
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `culture` | [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) | The non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | params [KeyValuePair](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt;[] | An array of [KeyValuePair&lt;TKey, TValue&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) objects there the [Key](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.key) identifies the resource entry and its resource [Value](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.value). |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `culture` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `culture` or `resources` is a null reference (Nothing in Visual Basic). |

#### AddResources(string, IDictionary&lt;string, string&gt;)

Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    string cultureName,
    IDictionary<string, string> resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    cultureName As String,
    resources As IDictionary(Of String, String))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `cultureName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name) of a well known non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt; | A dictionary its items are to be used to define the different resource entries using the key as the identifier and the value as the value of the resource entry. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `cultureName` is an empty string or the [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) referred to by `cultureName` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `cultureName` or `resources` is a null reference (Nothing in Visual Basic). |
| [CultureNotFoundException](https://learn.microsoft.com/dotnet/api/system.globalization.culturenotfoundexception) | The culture specified by `cultureName` does not refer to a well known culture. |

#### AddResources(CultureInfo, IDictionary&lt;string, string&gt;)

Adds or overrides the specified `resources` to/in the resources of the `culture` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    CultureInfo culture,
    IDictionary<string, string> resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resources As IDictionary(Of String, String))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `culture` | [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) | The non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | [IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.idictionary-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt; | A dictionary its items are to be used to define the different resource entries using the key as the identifier and the value as the value of the resource entry. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `culture` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `culture` or `resources` is a null reference (Nothing in Visual Basic). |

#### AddResources(string, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)

Adds or overrides the specified `resources` to/in the resources of the culture identified by `cultureName`.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    string cultureName,
    IEnumerable<KeyValuePair<string, string>> resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    cultureName As String,
    resources As IEnumerable(Of KeyValuePair(Of String, String)))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `cultureName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name) of a well known non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[KeyValuePair](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt;&gt; | A sequence of [KeyValuePair&lt;TKey, TValue&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) objects there the [Key](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.key) identifies the resource entry and its resource [Value](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.value). |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `cultureName` is an empty string or the [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) referred to by `cultureName` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `cultureName` or `resources` is a null reference (Nothing in Visual Basic). |
| [CultureNotFoundException](https://learn.microsoft.com/dotnet/api/system.globalization.culturenotfoundexception) | The culture specified by `cultureName` does not refer to a well known culture. |

#### AddResources(CultureInfo, IEnumerable&lt;KeyValuePair&lt;string, string&gt;&gt;)

Adds or overrides the specified `resources` to/in the resources of the `culture` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(
    CultureInfo culture,
    IEnumerable<KeyValuePair<string, string>> resources)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resources As IEnumerable(Of KeyValuePair(Of String, String)))
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `culture` | [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) | The non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resources` | [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)&lt;[KeyValuePair](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2)&lt;[String](https://learn.microsoft.com/dotnet/api/system.string), [String](https://learn.microsoft.com/dotnet/api/system.string)&gt;&gt; | A sequence of [KeyValuePair&lt;TKey, TValue&gt;](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) objects there the [Key](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.key) identifies the resource entry and its resource [Value](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2.value). |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `culture` is a neutral culture. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `culture` or `resources` is a null reference (Nothing in Visual Basic). |

#### AddResources(string, ResourceManager)

Adds or overrides the resources in the `resourceManager` to/in the resources of the culture identified by `cultureName`.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(string cultureName, ResourceManager resourceManager)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    cultureName As String,
    resourceManager As ResourceManager)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `cultureName` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The [Name](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.name) of a well known non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resourceManager` | [ResourceManager](https://learn.microsoft.com/dotnet/api/system.resources.resourcemanager) | The [ResourceManager](https://learn.microsoft.com/dotnet/api/system.resources.resourcemanager) its culture-related [ResourceSet](https://learn.microsoft.com/dotnet/api/system.resources.resourceset) is to be queried and used to add/override the resource entries associated with the culture identified by the `cultureName`. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `cultureName` is an empty string or the [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) referred to by `cultureName` is a neutral culture or the `resourceManager` does not provide a [ResourceSet](https://learn.microsoft.com/dotnet/api/system.resources.resourceset) for the culture identified by the `cultureName`. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `cultureName` or `resourceManager` is a null reference (Nothing in Visual Basic). |
| [CultureNotFoundException](https://learn.microsoft.com/dotnet/api/system.globalization.culturenotfoundexception) | The culture specified by `cultureName` does not refer to a well known culture. |

#### AddResources(CultureInfo, ResourceManager)

Adds or overrides the resources in the `resourceManager` to/in the resources of the `culture` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public void AddResources(CultureInfo culture, ResourceManager resourceManager)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resourceManager As ResourceManager)
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `culture` | [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo) | The non-neutral [CultureInfo](https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo). |
| `resourceManager` | [ResourceManager](https://learn.microsoft.com/dotnet/api/system.resources.resourcemanager) | The [ResourceManager](https://learn.microsoft.com/dotnet/api/system.resources.resourcemanager) its culture-related [ResourceSet](https://learn.microsoft.com/dotnet/api/system.resources.resourceset) is to be queried and used to add/override the resource entries associated with the `culture` specified. |

**Exceptions**

| Exception | Condition |
|---|---|
| [ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception) | The `culture` is a neutral culture or the `resourceManager` does not provide a [ResourceSet](https://learn.microsoft.com/dotnet/api/system.resources.resourceset) for the `culture` specified. |
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `culture` or `resourceManager` is a null reference (Nothing in Visual Basic). |

### Translate

<span class="api-meta">3 overloads · since v2.18</span>

| Overload | Description |
|---|---|
| [Translate(OpcContext, OpcResult)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#translate-opc-uafx-opccontext-opc-uafx-opcresult)<span class="api-meta">since v2.18</span> | Translates the `result` specified. |
| [Translate(OpcContext, OpcText)](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.server.opcserverglobalization/members#translate-opc-uafx-opccontext-opc-uafx-opctext)<span class="api-meta">since v2.18</span> | Translates the `text` specified. |
| [Translate(OpcContext, string, string, params object\[\])](#translate-opc-uafx-opccontext-system-string-system-string-system-object-array)<span class="api-meta">since v2.18</span> | Translates the `message` using the resource identified by its `key` and then formats it with the `arguments` specified. |

**Exceptions (all overloads)**

| Exception | Condition |
|---|---|
| [ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception) | The `context` is a null reference (Nothing in Visual Basic). |

#### Translate(OpcContext, OpcResult)

<span class="api-meta">since v2.18</span>

Translates the `result` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcResult Translate(OpcContext context, OpcResult result)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function Translate(
    context As OpcContext,
    result As OpcResult) As OpcResult
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) for which the `result` is to be localized. |
| `result` | [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) | The [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) to localize. |

**Returns**

[OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/)

The localized [OpcResult](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcresult/) or the `result` specified if no resource could determined to localize the `result`.

#### Translate(OpcContext, OpcText)

<span class="api-meta">since v2.18</span>

Translates the `text` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcText Translate(OpcContext context, OpcText text)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function Translate(context As OpcContext, text As OpcText) As OpcText
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) for which the `text` is to be localized. |
| `text` | [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) | The [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) to localize. |

**Returns**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)

The localized [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) or the `text` specified if no resource could determined to localize the `text`.

#### Translate(OpcContext, string, string, params object\[\])

<span class="api-meta">since v2.18</span>

Translates the `message` using the resource identified by its `key` and then formats it with the `arguments` specified.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcText Translate(
    OpcContext context,
    string key,
    string message,
    params object[] arguments)
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Function Translate(
    context As OpcContext,
    key As String,
    message As String,
    ParamArray arguments As Object()) As OpcText
```

</div>

**Parameters**

| Name | Type | Description |
|---|---|---|
| `context` | [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) | The [OpcContext](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccontext/) for which the `key`, `message` and `arguments` are to be localized. |
| `key` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The key used to look up the translation resource. |
| `message` | [String](https://learn.microsoft.com/dotnet/api/system.string) | The text to translate. |
| `arguments` | params [Object](https://learn.microsoft.com/dotnet/api/system.object)[] | The format arguments. |

**Returns**

[OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/)

The localized [OpcText](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opctext/) or a null reference (Nothing in Visual Basic) if no resource could determined to localize the `key`, `message` and `arguments`.
