Class LocaleFile
A wrapper around an XmlDictionary used to store localized strings.
public sealed class LocaleFile
- Inheritance
-
LocaleFile
- Inherited Members
- Extension Methods
Constructors
LocaleFile()
Base-constructor for XML serialization. Do not call manually!
public LocaleFile()
Fields
FileExt
The file extensions when this class is stored as a file.
public const string FileExt = ".locale"
Field Value
Properties
Entries
The collection of entries to be stored.
public XmlDictionary Entries { get; }
Property Value
Methods
FromContent(string)
Loads a localization table from an XML file via the ContentManager.
public static XmlDictionary FromContent(string id)
Parameters
id
stringThe ID of the file to load from.
Returns
- XmlDictionary
The loaded table.
Load(string)
Loads a localization table from an XML file.
public static XmlDictionary Load(string path)
Parameters
path
stringThe file to load from.
Returns
- XmlDictionary
The loaded table.
LoadLang(string)
Loads a localization table from an XML file if possible.
public static XmlDictionary LoadLang(string language)
Parameters
language
stringThe language to load.
Returns
- XmlDictionary
The loaded table or an empty table if not found.
Save(string, XmlDictionary)
Saves a localization table in an XML file.
public static void Save(string path, XmlDictionary entries)
Parameters
path
stringThe file to save in
entries
XmlDictionaryThe collection of entries to be stored.