Class Translator
Provides a translator for localized PLC strings
Inherited Members
Namespace: AXSharp.Connector.Localizations
Assembly: AXSharp.Connector.dll
Syntax
public class Translator
Methods
| Edit this page View SourceLocalize(string, ITwinElement, CultureInfo)
Declaration
public string Localize(string str, ITwinElement twinElement, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
string | str | |
ITwinElement | twinElement | |
CultureInfo | culture |
Returns
Type | Description |
---|---|
string |
SetLocalizationResource(Type)
Sets the localization resource for this translator.
Declaration
public void SetLocalizationResource(Type resourceType)
Parameters
Type | Name | Description |
---|---|---|
Type | resourceType | Type of resource to be used. |
Translate(string, ITwinElement, CultureInfo)
Translates localized string.
Declaration
public string Translate(string originalString, ITwinElement twin, CultureInfo culture = null)
Parameters
Type | Name | Description |
---|---|---|
string | originalString | Localized string. |
ITwinElement | twin | Twin element to which the string is attached. |
CultureInfo | culture |
Returns
Type | Description |
---|---|
string |