logo

Strings class, used to lookup translations with GNU Gettext More...

Static Public Member Functions

static string T (string t)
 Looks up a localized string; used to mark string for translation as well. More...
 
static string T (CultureInfo info, string t)
 Looks up a localized string; used to mark string for translation as well. More...
 
static string T (string t, params object[] parameters)
 Looks up a localized string and formats it with the parameters provided; used to mark string for translation as well. More...
 
static string T (CultureInfo info, string t, params object[] parameters)
 Looks up a localized string and formats it with the parameters provided; used to mark string for translation as well. More...
 
static string M (string t)
 Marks a string for future translation, does not translate it now. More...
 
static System.Resources.ResourceSet GetResourceSet (CultureInfo culture)
 Returns the resource set available for the specified culture. More...
 
static void TranslateForm (System.Windows.Forms.Form form)
 Translate all controls and toolstrip contextmenu of the given form. More...
 

Public Attributes

const string ResourceName = "Strings"
 The po filename without extension More...
 
const string RESOURCESDIR = "translations"
 The folder where all translations are stored in. More...
 

Properties

static
System.Globalization.CultureInfo 
Culture [get, set]
 Gets or sets the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. More...
 
static
System.Resources.ResourceManager 
ResourceManager [get]
 Gets the cached ResourceManager instance used by this class. More...
 

Static Private Member Functions

static void TranslateControlCollection (System.Windows.Forms.Control.ControlCollection controlscollection, int controlnestedlevel)
 Recusive method that translate all control in a ControlCollection. More...
 
static void TranslateToolStripItemCollection (System.Windows.Forms.ToolStripItemCollection toolstripitemcollection)
 Translate the toolstripitemcollection. More...
 
static string GetTranslationControl (string text, string ctrlname)
 Get a translation for a particulair control. More...
 
static bool IsTranslatableControl (System.Windows.Forms.Control control)
 Get if the control should be translated. More...
 

Private Attributes

const string FILEFORMAT = "{{culture}}/{{resource}}.po"
 Path to resource within the transation folder. More...
 

Static Private Attributes

static object resourceManLock = new object()
 Lock object to make only one ResourceManager being accessed at the same time. More...
 
static
System.Resources.ResourceManager 
resourceMan
 Resource manager More...
 
static
System.Globalization.CultureInfo 
resourceCulture
 CultureInfo object More...
 

Detailed Description

Member Function Documentation

static System.Resources.ResourceSet NoteFly.Strings.GetResourceSet ( CultureInfo  culture)
static
Parameters
cultureCultureInfo object
Returns
ResourceSet of culture
static string NoteFly.Strings.GetTranslationControl ( string  text,
string  ctrlname 
)
staticprivate
Parameters
textOrginele text
ctrlnameControl name
Returns
The text translation of the text properties of the control.
static bool NoteFly.Strings.IsTranslatableControl ( System.Windows.Forms.Control  control)
staticprivate
Parameters
controlControl to check name and type from
Returns
True if control text should be translated
static string NoteFly.Strings.M ( string  t)
static
Parameters
tThe string to mark for future translation
Returns
Orignal string
static string NoteFly.Strings.T ( string  t)
static
Parameters
tThe string to translate.
Returns
A translated string
static string NoteFly.Strings.T ( CultureInfo  info,
string  t 
)
static
Parameters
infoCultureInfo object.
tThe string to translate.
Returns
An translated string.
static string NoteFly.Strings.T ( string  t,
params object[]  parameters 
)
static
Parameters
tThe string to translate.
parametersParameters to be placed in the string.
Returns
An translated string.
static string NoteFly.Strings.T ( CultureInfo  info,
string  t,
params object[]  parameters 
)
static
Parameters
infoCultureInfo object.
tThe string to translate.
parametersParameters in the string.
Returns
The translated string with orginal parameters.
static void NoteFly.Strings.TranslateControlCollection ( System.Windows.Forms.Control.ControlCollection  controlscollection,
int  controlnestedlevel 
)
staticprivate
Parameters
controlscollectionCollection of controls to translate.
controlnestedlevelDepth level of the control on the form.
static void NoteFly.Strings.TranslateForm ( System.Windows.Forms.Form  form)
static
Parameters
formThe form to translate
static void NoteFly.Strings.TranslateToolStripItemCollection ( System.Windows.Forms.ToolStripItemCollection  toolstripitemcollection)
staticprivate
Parameters
toolstripitemcollectionCollection of toolstripitems to translate.

Member Data Documentation

const string NoteFly.Strings.FILEFORMAT = "{{culture}}/{{resource}}.po"
private
System.Globalization.CultureInfo NoteFly.Strings.resourceCulture
staticprivate
System.Resources.ResourceManager NoteFly.Strings.resourceMan
staticprivate
object NoteFly.Strings.resourceManLock = new object()
staticprivate
const string NoteFly.Strings.ResourceName = "Strings"
const string NoteFly.Strings.RESOURCESDIR = "translations"

Property Documentation

System.Globalization.CultureInfo NoteFly.Strings.Culture
staticgetset
System.Resources.ResourceManager NoteFly.Strings.ResourceManager
staticget