Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Lingo.Lingo

Summary

Static class with helper methods to support multi-language applications.

Static methods

Language?
LanguageFromIsoCode(string isoCode)
Returns the language from the Language enum which corresponds to the specified ISO code, or null if none matches.
TranslationBase
LoadTranslation(Type translationType, string module, Language language)
Loads and returns the translation for the specified module and language. The translation must exist in the application executable directory under a subdirectory called "Translations". If the translation cannot be loaded successfully, an exception is thrown.
TTranslation
LoadTranslation<TTranslation>(string module, Language language)
TTranslation
LoadTranslationOrDefault<TTranslation>(string module, ref Language language)
Attempts to load the translation for the specified module and language. The translation must exist in the application executable directory under a subdirectory called "Translations". If the translation loaded successfully, returns the translation instance. Otherwise, the TTranslation default constructor is called and the result returned, and language is set to the default language returned by this constructor.
void
PostBuildStep<TTranslation>(IPostBuildReporter rep, params Assembly[] assemblies)
Checks the specified assemblies for any obvious Lingo-related problems, including unused strings, mismatched enum translations.
void
SaveTranslation(Type translationType, string moduleName, TranslationBase translation)
Writes the specified translation for the specified module to an XML file in the application directory.
void
SaveTranslation<TTranslation>(string moduleName, TTranslation translation)
void
TranslateControl(Control control, object translation)
Translates the text of the specified control and all its sub-controls using the specified translation object.
void
TranslateWindow(Window window, object translation)

Static fields

string If not null, whenever a translation is saved, Lingo will also attempt to save it in this directory. Use an absolute path. Lingo will quietly ignore any errors when saving here, and will do nothing if the path is missing. Lingo will overwrite read-only files without prompts.

Nested types

Contains utility methods to generate C# code for translation strings required for automated translation of forms and controls.