wx.Globalization.StringInCultures Class Reference

List of all members.

Public Member Functions

void Add (CultureName culture, string translation)
string GetTranslation ()
string GetTranslation (CultureName culture)
string GetTranslation (string canonicalName)
string GetTranslation (Language lang)
 StringInCultures (string original, params string[] pairs)

Properties

System.Collections.Generic.ICollection
< CultureName
Cultures [get]
string DefaultTranslation [get]
string this [CultureName culture] [get, set]


Detailed Description

Instances of this classhold translations of one string.

Constructor & Destructor Documentation

wx.Globalization.StringInCultures.StringInCultures ( string  original,
params string[]  pairs 
)

Creates an instance comprising several translations.

Parameters:
original is the original string.
pairs is a sequence of an even number of strings. The first is the canonical name, the second is the translation of original into the locale according to the first string. The third is the canonical name, the forth is the translation of original into the locale according to the third string, and so on.
Example:
         StringInCultures("talk", "de", "reden")


Member Function Documentation

void wx.Globalization.StringInCultures.Add ( CultureName  culture,
string  translation 
)

string wx.Globalization.StringInCultures.GetTranslation (  ) 

This will translate into the current culture according to System.Globalization.CultureInfo.CurrentCulture.

string wx.Globalization.StringInCultures.GetTranslation ( CultureName  culture  ) 

This returns the translation of the original string into culture. If the original cannot be translated into culture, this will try to translate into language and country of culture. If this is also not possible, this will try to translate into the language of culture. If even this fails, this method will return null.

string wx.Globalization.StringInCultures.GetTranslation ( string  canonicalName  ) 

Translate into the language as specified by the provided canonical name. If the original cannot be translated into the specified culture, this will try to translate into language and country of culture. If this is also not possible, this will try to translate into the language of culture. If even this fails, this method will return null.

string wx.Globalization.StringInCultures.GetTranslation ( Language  lang  ) 

Translate into the language as specified by the provided canonical language. If the original cannot be translated into the specified culture, this will try to translate into language and country of culture. If this is also not possible, this will try to translate into the language of culture. If even this fails, this method will return null.


Property Documentation

System.Collections.Generic.ICollection<CultureName> wx.Globalization.StringInCultures.Cultures [get]

This instance holds translations into this cultures.

string wx.Globalization.StringInCultures.DefaultTranslation [get]

This instance holds the default translation of this string.

string wx.Globalization.StringInCultures.this[CultureName culture] (  )  [get, set]

Returns the translation of the original term into the provided culture if this exists and null otherwise.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads