SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
|
Utility class to execute code in a specific language variant and restore the original selection of the language variant afterwards. More...
Public Member Functions | |
LanguageContext (ILanguageVariant lang) | |
Selects a language variant and restores the previously selected language variant on dispose. | |
LanguageContext (IProject project) | |
Just restores the language context on dispose. Does not set a specific language variant on construction. | |
void | Dispose () |
Utility class to execute code in a specific language variant and restore the original selection of the language variant afterwards.
project.LanguageVariants["ENG"].Select(); ... using(new LanguageContext(project.LanguageVariants["DEU"])) { //the following code is executed with the German language variant selected ... } //the following code is executed with the UK English language variant selected ...
Definition at line 27 of file LanguageContext.cs.
erminas.SmartAPI.Utils.LanguageContext.LanguageContext | ( | ILanguageVariant | lang | ) |
Selects a language variant and restores the previously selected language variant on dispose.
lang |
Definition at line 35 of file LanguageContext.cs.
erminas.SmartAPI.Utils.LanguageContext.LanguageContext | ( | IProject | project | ) |
Just restores the language context on dispose. Does not set a specific language variant on construction.
Definition at line 45 of file LanguageContext.cs.
void erminas.SmartAPI.Utils.LanguageContext.Dispose | ( | ) |