Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: TTranslation LoadTranslationOrDefault<TTranslation>(string, ref Language)

  • Declared in: RT.Lingo.Lingo

Declaration

public static TTranslation LoadTranslationOrDefault<TTranslation>(
    string module,
    ref Language language
)

Summary

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.

Generic type parameters

TTranslation
  • Must derive from: RT.Lingo.TranslationBase.
  • Must have a default constructor.
The type of the translation class to load the translation into.

Parameters

stringmoduleThe name of the module whose translation to load.
ref LanguagelanguageThe language code of the language to load. This is set to the default language if the specified language cannot be loaded.

Returns

The loaded or default translation.