x4Trace Documentation v1.0
Loading...
Searching...
No Matches
Tools.Language Class Reference

Represents a language object. Translates strings by dictionary. More...

Static Public Member Functions

static void Initialize (System.IO.StreamReader streamReader)
 Initialises the dictionary.
 
static void Save ()
 Saves the dictionary.
 
static void Add (string text1, string text2)
 Adds word or sentence to dictionary.
 
static string Get (string text)
 Returns a translated text.
 
static string Get (string text, string[] varriables, string[] values)
 Returns a translated text.
 

Static Private Attributes

static System.Collections.Generic.Dictionary< string, string > words = new Dictionary<string, string>()
 Dictionary of words and sentences.
 

Detailed Description

Represents a language object. Translates strings by dictionary.

Member Function Documentation

◆ Add()

static void Tools.Language.Add ( string text1,
string text2 )
static

Adds word or sentence to dictionary.

Parameters
text1Text of key.
text2Text of value.

◆ Get() [1/2]

static string Tools.Language.Get ( string text)
static

Returns a translated text.

Parameters
textText to translate.
Returns
Translated text.

◆ Get() [2/2]

static string Tools.Language.Get ( string text,
string[] varriables,
string[] values )
static

Returns a translated text.

Parameters
textText to translate.
varriablesVariables of text.
valuesValues of variables.
Returns
Translated text.

◆ Initialize()

static void Tools.Language.Initialize ( System.IO.StreamReader streamReader)
static

Initialises the dictionary.

Parameters
streamReaderStream of words.

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