wx.Locale Class Reference

Inheritance diagram for wx.Locale:

wx.Object

List of all members.

Public Member Functions

bool AddCatalog (string szDomain, Language msgIdLanguage, string msgIdCharset)
bool AddCatalog (string szDomain)
void AddCatalogLookupPathPrefix (string prefix)
override void Dispose ()
string GetHeaderValue (string szHeader, string szDomain)
string GetHeaderValue (string szHeader)
string GetLocale ()
string GetString (string szOrigString, string szDomain)
string GetString (string szOrigString)
bool Init (Language language, LocaleInitFlags flags)
bool Init (Language language)
bool Init ()
bool IsLoaded (string domain)
 Locale (Language language, LocaleInitFlags flags)
 Locale (Language language)
 Locale ()
 Locale (IntPtr wxObject)

Static Public Member Functions

static void AddLanguage (LanguageInfo info)
static LanguageInfo FindLanguageInfo (string locale)
static LanguageInfo GetLanguageInfo (Language lang)
static string GetLanguageName (Language lang)

Properties

string CanonicalName [get]
bool IsOk [get]
Language Language [get]
string Name [get]
string SysName [get]
static FontEncoding SystemEncoding [get]
static string SystemEncodingName [get]
static Language SystemLanguage [get]


Detailed Description

This class wrapps wxLocale.

Constructor & Destructor Documentation

wx.Locale.Locale ( IntPtr  wxObject  ) 

wx.Locale.Locale (  ) 

wx.Locale.Locale ( Language  language  ) 

wx.Locale.Locale ( Language  language,
LocaleInitFlags  flags 
)


Member Function Documentation

bool wx.Locale.AddCatalog ( string  szDomain,
Language  msgIdLanguage,
string  msgIdCharset 
)

Add a catalog for use with the current locale: it is searched for in standard places (current directory first, then the system one), but you may also prepend additional directories to the search path with AddCatalogLookupPathPrefix(). All loaded catalogs will be used for message lookup by GetString() for the current locale.

Returns true if catalog was successfully loaded, false otherwise (which might mean that the catalog is not found or that it isn't in the correct format).

Parameters:
szDomain Descriptor of the domain that is covered by the requested catalog, i.e. the basename of the catalog file.
msgIdLanguage The target language of translations from this catalog.
msgIdCharset msgIdCharset lets you specify the charset used for msgids in sources in case they use 8-bit characters (e.g. German or French strings). This argument has no effect in Unicode build, because literals in sources are Unicode strings; you have to use compiler-specific method of setting the right charset when compiling with Unicode.

bool wx.Locale.AddCatalog ( string  szDomain  ) 

Add a catalog for use with the current locale: it is searched for in standard places (current directory first, then the system one), but you may also prepend additional directories to the search path with AddCatalogLookupPathPrefix(). All loaded catalogs will be used for message lookup by GetString() for the current locale.

Returns true if catalog was successfully loaded, false otherwise (which might mean that the catalog is not found or that it isn't in the correct format).

Parameters:
szDomain Descriptor of the domain that is covered by the requested catalog, i.e. the basename of the catalog file.

void wx.Locale.AddCatalogLookupPathPrefix ( string  prefix  ) 

Add a prefix to the catalog lookup path: the message catalog files will be looked up under prefix/(CANONICAL_LANGUAGE_STRING)/LC_MESSAGES, prefix/(CANONICAL_LANGUAGE_STRING) and prefix (in this order).

This only applies to subsequent invocations of AddCatalog().

Parameters:
prefix New prefix directories where to search for language catalogs.

static void wx.Locale.AddLanguage ( LanguageInfo  info  )  [static]

override void wx.Locale.Dispose (  )  [virtual]

Reimplemented from wx.Object.

static LanguageInfo wx.Locale.FindLanguageInfo ( string  locale  )  [static]

string wx.Locale.GetHeaderValue ( string  szHeader,
string  szDomain 
)

string wx.Locale.GetHeaderValue ( string  szHeader  ) 

static LanguageInfo wx.Locale.GetLanguageInfo ( Language  lang  )  [static]

Information struct on the language as designated by the argument.

Parameters:
lang The language designator. Language.wxLANGUAGE_DEFAULT will be replaced by the system language.
Returns:
Language information

static string wx.Locale.GetLanguageName ( Language  lang  )  [static]

Long name of the language as designated by the argument (e.g. "German").

Parameters:
lang The language designator. Language.wxLANGUAGE_DEFAULT will be replaced by the system language.
Returns:
Language information

string wx.Locale.GetLocale (  ) 

string wx.Locale.GetString ( string  szOrigString,
string  szDomain 
)

string wx.Locale.GetString ( string  szOrigString  ) 

bool wx.Locale.Init ( Language  language,
LocaleInitFlags  flags 
)

Initializes this locale with the provided language.

Parameters:
language Language to be used for translation.
flags Flags
Returns:
True on success and false if the locale has not been set.

bool wx.Locale.Init ( Language  language  ) 

Initializes this locale with the provided language.

Parameters:
language Language to be used for translation.
Returns:
True on success and false if the locale has not been set.

bool wx.Locale.Init (  ) 

Initializes this locale with the users default language as obtained from the operating system.

Returns:
True on success and false if the locale has not been set.

bool wx.Locale.IsLoaded ( string  domain  ) 


Property Documentation

string wx.Locale.CanonicalName [get]

Canonical name of the language that is used by this locale. Examples: "en", "de-de".

bool wx.Locale.IsOk [get]

Language wx.Locale.Language [get]

string wx.Locale.Name [get]

string wx.Locale.SysName [get]

FontEncoding wx.Locale.SystemEncoding [static, get]

string wx.Locale.SystemEncodingName [static, get]

Tries to detect the name of the user's default font encoding. This string isn't particularly useful for the application as its form is platform-dependent and so you should probably use GetSystemEncoding() instead.

Returns a user-readable string value or an empty string if it couldn't be determined.

Language wx.Locale.SystemLanguage [static, get]

Tries to detect the user's default language setting. Returns wxLanguage.LANGUAGE_UNKNOWN if the language-guessing algorithm failed.


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