OpenPetra
Free Administration Software for Non-Profits
Ict.Common.Catalog Class Reference

a helper class for Gnu gettext More...

Static Public Member Functions

static void Init ()
 initialise the resource manager with the default language More...
 
static void Init (string ALanguageCode, string ACultureCode)
 initialise the resource manager with the given language More...
 
static CultureInfo SetCulture (CultureInfo ACulture)
 set the given culture More...
 
static CultureInfo SetCulture (string ACulture)
 set the given culture More...
 
static void SetLanguage (string ALanguageCode)
 set the new language More...
 
static string GetString (string AEnglishMessage)
 get the translated string More...
 
static string GetPluralString (String msgid, String msgidPlural, long n, bool treatZeroAsPlural=false)
 Returns the translation of msgid and msgidPlural , choosing the right plural form depending on the number n . More...
 

Properties

static bool ResourceManagerInitialisedWithGivenLanguage [get]
 True when the Resource Manager was initialised with the given language after Init(string,string) has been called, otherwise false. More...
 

Detailed Description

a helper class for Gnu gettext

Member Function Documentation

◆ GetPluralString()

static string Ict.Common.Catalog.GetPluralString ( String  msgid,
String  msgidPlural,
long  n,
bool  treatZeroAsPlural = false 
)
inlinestatic

Returns the translation of msgid and msgidPlural , choosing the right plural form depending on the number n .

Parameters
msgidthe key string to be translated, an ASCII string
msgidPluralthe English plural of msgid , an ASCII string
nthe number, should be >= 0
treatZeroAsPluralif set to true then the number 0 is considered being plural (for situations like where strings like "0 records" are to be displayed).
Returns
the translation, or null if none is found

◆ GetString()

static string Ict.Common.Catalog.GetString ( string  AEnglishMessage)
inlinestatic

get the translated string

◆ Init() [1/2]

static void Ict.Common.Catalog.Init ( )
inlinestatic

initialise the resource manager with the default language

◆ Init() [2/2]

static void Ict.Common.Catalog.Init ( string  ALanguageCode,
string  ACultureCode 
)
inlinestatic

initialise the resource manager with the given language

◆ SetCulture() [1/2]

static CultureInfo Ict.Common.Catalog.SetCulture ( CultureInfo  ACulture)
inlinestatic

set the given culture

Parameters
ACulture
Returns
the previously set culture

◆ SetCulture() [2/2]

static CultureInfo Ict.Common.Catalog.SetCulture ( string  ACulture)
inlinestatic

set the given culture

Parameters
ACulture
Returns
the previously set culture

◆ SetLanguage()

static void Ict.Common.Catalog.SetLanguage ( string  ALanguageCode)
inlinestatic

set the new language

Property Documentation

◆ ResourceManagerInitialisedWithGivenLanguage

bool Ict.Common.Catalog.ResourceManagerInitialisedWithGivenLanguage
staticget

True when the Resource Manager was initialised with the given language after Init(string,string) has been called, otherwise false.


The documentation for this class was generated from the following file: