Detailed Description

Override this class to provide methods for loading language files. They may be delivered in many different ways because of this.

Inheritance diagram for Dom.LanguageLoader:
Dom.PowerUILanguageLoader

Public Member Functions

 LanguageLoader (string path)
 Creates a new loader for the given path. More...
 
void GetGroup (string code, string groupName, LanguageEventDelegate groupReady)
 Loads a standard group by name. More...
 
Language Get (string code)
 Gets the language with the given code. More...
 
virtual void LoadFile (string path, LanguageTextEvent onFileAvailable)
 Loads an XML file at the given path. More...
 

Public Attributes

string Path
 The path to the location of the languages. More...
 
Dictionary< string, LanguageLanguages
 The set of all languages if they've all been loaded. Indexed by lowercase language code. More...
 

Package Functions

LanguageEvent CreateEvent (string type)
 Creates a language event for this loader. More...
 

Constructor & Destructor Documentation

Dom.LanguageLoader.LanguageLoader ( string  path)
inline

Creates a new loader for the given path.

Member Function Documentation

LanguageEvent Dom.LanguageLoader.CreateEvent ( string  type)
inlinepackage

Creates a language event for this loader.

Language Dom.LanguageLoader.Get ( string  code)
inline

Gets the language with the given code.

Parameters
codeThe language code to look for.
Returns
Creates the language if it doesn't exist. Never null.
void Dom.LanguageLoader.GetGroup ( string  code,
string  groupName,
LanguageEventDelegate  groupReady 
)
inline

Loads a standard group by name.

Parameters
codeThe language code.
groupNameThe name of the group.
virtual void Dom.LanguageLoader.LoadFile ( string  path,
LanguageTextEvent  onFileAvailable 
)
inlinevirtual

Loads an XML file at the given path.

Parameters
onFileAvailableA callback that runs when the file has been downloaded.

Reimplemented in Dom.PowerUILanguageLoader.

Member Data Documentation

Dictionary<string,Language> Dom.LanguageLoader.Languages

The set of all languages if they've all been loaded. Indexed by lowercase language code.

string Dom.LanguageLoader.Path

The path to the location of the languages.