Class Translation
- Namespace
- Dynamicweb.Rendering.Translation
- Assembly
- Dynamicweb.Core.dll
- Inheritance
-
Translation
- Inherited Members
Methods
GetTranslation(string, Design?)
Gets the translation.
Parameters
Returns
- string
Translation or
key
if translation not found.
Remarks
The culture is current culture of frontend.
GetTranslation(string, CultureInfo, Design?)
Gets the translation.
Parameters
key
stringThe key.
culture
CultureInfo The culture.
design
DesignThe 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
stringThe key.
culture
CultureInfo The culture.
scope
KeyScope The scope.
design
DesignThe design.
Returns
- string
Translation or
key
if translation not found.
GetTranslation(string, string, Design?)
Gets the translation.
Parameters
Returns
- string
Translation or
key
if translation not found.
GetTranslationKeys(KeyScope, Design?)
Gets the translation keys.
Parameters
Returns
- Key
Collection The function returns a Key
Collection
Remarks
The scope
parameter supports KeyScope.DesignsShared
and KeyScope.DesignsLocal
only.
If scope
is KeyScope.DesignsShared
set design
parameter to null
Exceptions
- Argument
Exception designs only;scope
GetTranslations(string, KeyScope, Design?)
Gets the translations.
public static TranslationEntryCollection GetTranslations(string key, KeyScope scope, Design? design)
Parameters
Returns
- Translation
Entry Collection The function returns a Translation
Entry Collection
Remarks
The scope
parameter supports KeyScope.DesignsShared
and KeyScope.DesignsLocal
only.
If scope
is KeyScope.DesignsShared
set design
parameter to null
Exceptions
- Argument
Exception designs only;scope
RemoveTranslation(string, KeyScope, Design?, string)
public static void RemoveTranslation(string key, KeyScope scope, Design? design, string cultureCode)
Parameters
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
stringThe key.
translation
stringThe translation.
culture
CultureInfo The culture.
scope
KeyScope The scope.
design
DesigndefaultValue
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
- Argument
Exception 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
stringThe key.
translation
stringThe translation.
cultureCode
stringThe culture code.
scope
KeyScope The scope.
design
DesignThe 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
- Argument
Exception designs only;scope