Table of Contents

Class Translation

Namespace
Dynamicweb.Rendering.Translation
Assembly
Dynamicweb.Core.dll
public class Translation
Inheritance
Translation
Inherited Members

Methods

GetTranslation(string, Design?)

Gets the translation.

public static string GetTranslation(string key, Design? design)

Parameters

key string

The key.

design Design

The design.

Returns

string

Translation or key if translation not found.

Remarks

The culture is current culture of frontend.

GetTranslation(string, CultureInfo, Design?)

Gets the translation.

public static string GetTranslation(string key, CultureInfo culture, Design? design)

Parameters

key string

The key.

culture CultureInfo

The culture.

design Design

The design.

Returns

string

Translation or key if translation not found.

GetTranslation(string, CultureInfo, KeyScope, Design?)

Gets the translation.

public static string GetTranslation(string key, CultureInfo culture, KeyScope scope, Design? design)

Parameters

key string

The key.

culture CultureInfo

The culture.

scope KeyScope

The scope.

design Design

The design.

Returns

string

Translation or key if translation not found.

GetTranslation(string, string, Design?)

Gets the translation.

public static string GetTranslation(string key, string cultureCode, Design? design)

Parameters

key string

The key.

cultureCode string

The culture code.

design Design

The design.

Returns

string

Translation or key if translation not found.

GetTranslationKeys(KeyScope, Design?)

Gets the translation keys.

public static KeyCollection GetTranslationKeys(KeyScope scope, Design? design)

Parameters

scope KeyScope

The scope.

design Design

The design.

Returns

KeyCollection

The function returns a KeyCollection

Remarks

The scope parameter supports KeyScope.DesignsShared and KeyScope.DesignsLocal only. If scope is KeyScope.DesignsShared set design parameter to null

Exceptions

ArgumentException

designs only;scope

GetTranslations(string, KeyScope, Design?)

Gets the translations.

public static TranslationEntryCollection GetTranslations(string key, KeyScope scope, Design? design)

Parameters

key string

The key.

scope KeyScope

The scope.

design Design

The design.

Returns

TranslationEntryCollection

The function returns a TranslationEntryCollection

Remarks

The scope parameter supports KeyScope.DesignsShared and KeyScope.DesignsLocal only. If scope is KeyScope.DesignsShared set design parameter to null

Exceptions

ArgumentException

designs only;scope

RemoveTranslation(string, KeyScope, Design?, string)

public static void RemoveTranslation(string key, KeyScope scope, Design? design, string cultureCode)

Parameters

key string
scope KeyScope
design Design
cultureCode string

SetTranslation(string, string, CultureInfo, KeyScope, Design?, string)

Sets the translation for given key and culture.

public static void SetTranslation(string key, string translation, CultureInfo culture, KeyScope scope, Design? design, string defaultValue)

Parameters

key string

The key.

translation string

The translation.

culture CultureInfo

The culture.

scope KeyScope

The scope.

design Design
defaultValue string

Remarks

The scope parameter supports KeyScope.DesignsShared and KeyScope.DesignsLocal only. If scope is KeyScope.DesignsShared the design set design parameter to null

To remove translation set translation parameter to null

Exceptions

ArgumentException

designs only;scope

SetTranslation(string, string?, string, KeyScope, Design?, string)

Sets the translation for given key and culture.

public static void SetTranslation(string key, string? translation, string cultureCode, KeyScope scope, Design? design, string defaultValue)

Parameters

key string

The key.

translation string

The translation.

cultureCode string

The culture code.

scope KeyScope

The scope.

design Design

The design.

defaultValue string

Remarks

The scope parameter supports KeyScope.DesignsShared and KeyScope.DesignsLocal only. If scope is KeyScope.DesignsShared set design parameter to null

To remove translation set translation parameter to null

Exceptions

ArgumentException

designs only;scope

To top