Table of Contents

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

text ApplicationText

Which sentence.

language UserLanguage

The 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

languages IUserLanguages

Resolves which language that is.

text ApplicationText

Which sentence.

user UserId

The person who will read it.

Returns

string

The sentence as that person's language states it.

Exceptions

ArgumentNullException

Thrown when languages is null.