Method GetText
- Namespace
- MailFathom.Application.Localization
- Assembly
- MailFathom.Application.dll
GetText(ApplicationText, UserLanguage)
Reads one sentence in one language.
public static string GetText(ApplicationText text, UserLanguage language)
Parameters
textApplicationTextWhich sentence.
languageUserLanguageThe language the person reading it chose.
Returns
- string
The sentence as that language states it.
Exceptions
- InvalidOperationException
Thrown when no resource file states the sentence, which is a build defect rather than an input.
GetText(IUserLanguages, ApplicationText, UserId)
Reads one sentence in the language one person chose.
public static string GetText(this IUserLanguages languages, ApplicationText text, UserId user)
Parameters
languagesIUserLanguagesResolves which language that is.
textApplicationTextWhich sentence.
userUserIdThe person who will read it.
Returns
- string
The sentence as that person's language states it.
Exceptions
- ArgumentNullException
Thrown when
languagesis null.