Public Member Functions | |
void | Add (CultureName culture, string original, string translation) |
void | AddRange (Dictionary alternativeTranslations) |
Dictionary (CultureName culture, string original, string translation, params string[] pairs) | |
Dictionary () | |
string | GetTranslation (CultureName culture, string original) |
string | GetTranslation (string original) |
Properties | |
string | this [string original] [get, set] |
wx.Globalization.Dictionary.Dictionary | ( | ) |
wx.Globalization.Dictionary.Dictionary | ( | CultureName | culture, | |
string | original, | |||
string | translation, | |||
params string[] | pairs | |||
) |
This is a dictionary containing translation into culture
.
original | provides the original that shall be translated. | |
translation | is the translation into the specified culture. | |
pairs | is an optional sequence of an even number of strings. The first one is an original term, the second is the translation of the first, the third is an original term, the forth is the translation of the forth, and so on. If this is an odd number of arugments, the last string will be silently ignored. |
void wx.Globalization.Dictionary.Add | ( | CultureName | culture, | |
string | original, | |||
string | translation | |||
) |
This will add translation
as translation of original
into culture
. This will raise an argument exception, or original
already is translated into culture
.
void wx.Globalization.Dictionary.AddRange | ( | Dictionary | alternativeTranslations | ) |
This will add all translation of alternativeTranslations
into this.
string wx.Globalization.Dictionary.GetTranslation | ( | CultureName | culture, | |
string | original | |||
) |
Tries to translate into culture
. If special culture name component is set, try to find a translation referring to the full culture name. If otherwise or not successful country name component is known, try to find a translation referring to language and culture. If failed, try to find a translation into the language as named by culture
. If even this failed, return null
.
Implements wx.Globalization.IDictionary.
string wx.Globalization.Dictionary.GetTranslation | ( | string | original | ) |
This will translate original
into the current culture according to System.Globalization.CultureInfo.CurrentCulture
.
string wx::Globalization.Dictionary::this | ( | ) | [get, set] |
Get or set a translation into the current (referring to System.Globalization)
culture.
Get or set a translation into the provided culture. Gets a translation that is specific to the provided culture or null
if this translation does not exist for the specified culture. Example: "reden" is "de" translation of "talk". "snacken" is a more specific translation into "de-DE-KUESTE".
this[CultureName.FromString("de"), "talk"]
this[CultureName.FromString("de-DE-KUESTE"], "talk")
this[CultureName.FromString("de-DE"), "talk"]
null
.