Skip to content

Reference

OpcServerGlobalization Members

Provides mechanisms to control the localization of data and information.

Reference

OpcServerGlobalization Members ​

Type
OpcServerGlobalization
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Methods ​

AddResource ​

2 overloads

OverloadDescription
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.
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.

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.

csharp
public void AddResource(string cultureName, string key, string value)
vbnet
Public Sub AddResource(cultureName As String, key As String, value As String)

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
keyStringThe identifier of the resource value.
valueStringThe string value of the resource.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe 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.

csharp
public void AddResource(CultureInfo culture, string key, string value)
vbnet
Public Sub AddResource(culture As CultureInfo, key As String, value As String)

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
keyStringThe identifier of the resource value.
valueStringThe string value of the resource.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe culture is a null reference (Nothing in Visual Basic).

AddResources ​

8 overloads

OverloadDescription
AddResources(string, params KeyValuePair<string, string>[])Adds or overrides the specified resources to/in the resources of the culture identified by cultureName.
AddResources(CultureInfo, params KeyValuePair<string, string>[])Adds or overrides the specified resources to/in the resources of the culture specified.
AddResources(string, IDictionary<string, string>)Adds or overrides the specified resources to/in the resources of the culture identified by cultureName.
AddResources(CultureInfo, IDictionary<string, string>)Adds or overrides the specified resources to/in the resources of the culture specified.
AddResources(string, IEnumerable<KeyValuePair<string, string>>)Adds or overrides the specified resources to/in the resources of the culture identified by cultureName.
AddResources(CultureInfo, IEnumerable<KeyValuePair<string, string>>)Adds or overrides the specified resources to/in the resources of the culture specified.
AddResources(string, ResourceManager)Adds or overrides the resources in the resourceManager to/in the resources of the culture identified by cultureName.
AddResources(CultureInfo, ResourceManager)Adds or overrides the resources in the resourceManager to/in the resources of the culture specified.

AddResources(string, params KeyValuePair<string, string>[]) ​

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

csharp
public void AddResources(
    string cultureName,
    params KeyValuePair<string, string>[] resources)
vbnet
Public Sub AddResources(
    cultureName As String,
    ParamArray resources As KeyValuePair(Of String, String)())

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
resourcesparams KeyValuePair<String, String>[]An array of KeyValuePair<TKey, TValue> objects there the Key identifies the resource entry and its resource Value.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName or resources is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe culture specified by cultureName does not refer to a well known culture.

AddResources(CultureInfo, params KeyValuePair<string, string>[]) ​

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

csharp
public void AddResources(
    CultureInfo culture,
    params KeyValuePair<string, string>[] resources)
vbnet
Public Sub AddResources(
    culture As CultureInfo,
    ParamArray resources As KeyValuePair(Of String, String)())

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
resourcesparams KeyValuePair<String, String>[]An array of KeyValuePair<TKey, TValue> objects there the Key identifies the resource entry and its resource Value.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe culture or resources is a null reference (Nothing in Visual Basic).

AddResources(string, IDictionary<string, string>) ​

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

csharp
public void AddResources(
    string cultureName,
    IDictionary<string, string> resources)
vbnet
Public Sub AddResources(
    cultureName As String,
    resources As IDictionary(Of String, String))

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
resourcesIDictionary<String, String>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

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName or resources is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe culture specified by cultureName does not refer to a well known culture.

AddResources(CultureInfo, IDictionary<string, string>) ​

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

csharp
public void AddResources(
    CultureInfo culture,
    IDictionary<string, string> resources)
vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resources As IDictionary(Of String, String))

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
resourcesIDictionary<String, String>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

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe culture or resources is a null reference (Nothing in Visual Basic).

AddResources(string, IEnumerable<KeyValuePair<string, string>>) ​

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

csharp
public void AddResources(
    string cultureName,
    IEnumerable<KeyValuePair<string, string>> resources)
vbnet
Public Sub AddResources(
    cultureName As String,
    resources As IEnumerable(Of KeyValuePair(Of String, String)))

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
resourcesIEnumerable<KeyValuePair<String, String>>A sequence of KeyValuePair<TKey, TValue> objects there the Key identifies the resource entry and its resource Value.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName or resources is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe culture specified by cultureName does not refer to a well known culture.

AddResources(CultureInfo, IEnumerable<KeyValuePair<string, string>>) ​

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

csharp
public void AddResources(
    CultureInfo culture,
    IEnumerable<KeyValuePair<string, string>> resources)
vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resources As IEnumerable(Of KeyValuePair(Of String, String)))

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
resourcesIEnumerable<KeyValuePair<String, String>>A sequence of KeyValuePair<TKey, TValue> objects there the Key identifies the resource entry and its resource Value.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe 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.

csharp
public void AddResources(string cultureName, ResourceManager resourceManager)
vbnet
Public Sub AddResources(
    cultureName As String,
    resourceManager As ResourceManager)

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
resourceManagerResourceManagerThe ResourceManager its culture-related ResourceSet is to be queried and used to add/override the resource entries associated with the culture identified by the cultureName.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture or the resourceManager does not provide a ResourceSet for the culture identified by the cultureName.
ArgumentNullExceptionThe cultureName or resourceManager is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe 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.

csharp
public void AddResources(CultureInfo culture, ResourceManager resourceManager)
vbnet
Public Sub AddResources(
    culture As CultureInfo,
    resourceManager As ResourceManager)

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
resourceManagerResourceManagerThe ResourceManager its culture-related ResourceSet is to be queried and used to add/override the resource entries associated with the culture specified.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture or the resourceManager does not provide a ResourceSet for the culture specified.
ArgumentNullExceptionThe culture or resourceManager is a null reference (Nothing in Visual Basic).

Translate ​

3 overloads · since v2.18

OverloadDescription
Translate(OpcContext, OpcResult)since v2.18Translates the result specified.
Translate(OpcContext, OpcText)since v2.18Translates the text specified.
Translate(OpcContext, string, string, params object[])since v2.18Translates the message using the resource identified by its key and then formats it with the arguments specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe context is a null reference (Nothing in Visual Basic).

Translate(OpcContext, OpcResult) ​

since v2.18

Translates the result specified.

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

Parameters

NameTypeDescription
contextOpcContextThe OpcContext for which the result is to be localized.
resultOpcResultThe OpcResult to localize.

Returns

OpcResult

The localized OpcResult or the result specified if no resource could determined to localize the result.

Translate(OpcContext, OpcText) ​

since v2.18

Translates the text specified.

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

Parameters

NameTypeDescription
contextOpcContextThe OpcContext for which the text is to be localized.
textOpcTextThe OpcText to localize.

Returns

OpcText

The localized OpcText or the text specified if no resource could determined to localize the text.

Translate(OpcContext, string, string, params object[]) ​

since v2.18

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

csharp
public OpcText Translate(
    OpcContext context,
    string key,
    string message,
    params object[] arguments)
vbnet
Public Function Translate(
    context As OpcContext,
    key As String,
    message As String,
    ParamArray arguments As Object()) As OpcText

Parameters

NameTypeDescription
contextOpcContextThe OpcContext for which the key, message and arguments are to be localized.
keyStringThe key used to look up the translation resource.
messageStringThe text to translate.
argumentsparams Object[]The format arguments.

Returns

OpcText

The localized OpcText or a null reference (Nothing in Visual Basic) if no resource could determined to localize the key, message and arguments.