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 Wrench.LanguageLoader:
Wrench.UnityLanguageLoader

Public Member Functions

 LanguageLoader (string path)
 Creates a new loader for the given path. More...
 
virtual LanguageSet GetGroup (string groupName, string code)
 Loads a standard group by name. More...
 
LanguageSet Get (string code)
 Gets the language with the given code. Called very rarely. More...
 
LanguageSet[] AllLanguages ()
 Gets all available languages. More...
 

Public Attributes

string Path
 The path to the location of the languages. More...
 

Protected Member Functions

virtual LanguageSet[] GetAllLanguages ()
 Gets all available languages. More...
 
virtual LanguageSet GetLanguage (string code)
 Override this to get a language by given code. More...
 

Private Attributes

LanguageSet[] AllLanguagesLoaded
 The set of all languages if they've all been loaded. More...
 

Constructor & Destructor Documentation

Wrench.LanguageLoader.LanguageLoader ( string  path)
inline

Creates a new loader for the given path.

Member Function Documentation

LanguageSet [] Wrench.LanguageLoader.AllLanguages ( )
inline

Gets all available languages.

Returns
The set of all available languages.
LanguageSet Wrench.LanguageLoader.Get ( string  code)
inline

Gets the language with the given code. Called very rarely.

Parameters
codeThe language code to look for.
Returns
A Language set if the language was found; null otherwise.
virtual LanguageSet [] Wrench.LanguageLoader.GetAllLanguages ( )
inlineprotectedvirtual

Gets all available languages.

Returns
The set of all available languages.

Reimplemented in Wrench.UnityLanguageLoader.

virtual LanguageSet Wrench.LanguageLoader.GetGroup ( string  groupName,
string  code 
)
inlinevirtual

Loads a standard group by name.

Parameters
groupNameThe name of the group.
codeThe language code.
virtual LanguageSet Wrench.LanguageLoader.GetLanguage ( string  code)
inlineprotectedvirtual

Override this to get a language by given code.

Parameters
codeThe language code (e.g. "en").
Returns
A language set if the language was found; null otherwise.

Reimplemented in Wrench.UnityLanguageLoader.

Member Data Documentation

LanguageSet [] Wrench.LanguageLoader.AllLanguagesLoaded
private

The set of all languages if they've all been loaded.

string Wrench.LanguageLoader.Path

The path to the location of the languages.