|
void | ActivateAllFonts () |
| Will load all font assets (for use in settings screen) More...
|
|
void | Awake () |
|
void | DeactivateAllFonts () |
| Unloads all non-used font assets (for use on leaving settings screen) More...
|
|
string | GetLanguage (bool translate=false) |
| Returns the name of the language (defaults to untranslated More...
|
|
| Language () |
|
string | LanguageName (string language, out Font newFont) |
| Gets the translated name of the language, and the font to use (if any) More...
|
|
List< string > | LoadedFonts () |
| Gets a list (string) of all catalogued fonts More...
|
|
List< string > | LoadedLanguages () |
| Gets a List (string) of all loaded languages More...
|
|
void | LoadLanguage (string path, bool localPath=true) |
| Loads language from specified xml (path defaults to under GameData) More...
|
|
void | LoadLanguages (bool clear=true) |
| Loads all languages in the Localisation folder under GameData More...
|
|
string | Save () |
| Placeholder for now, just returns the current language name. If we need to do more, we can. More...
|
|
void | SaveLanguages () |
| Saves the current state of all loaded languages. More...
|
|
void | SaveUntranslated () |
| Saves the list of found untranslated strings in all loaded languages. More...
|
|
bool | SetLanguage (string langName) |
| Sets the currently active language if it exists, else returns false. Does nothing if language name already = this. More...
|
|
string | Translate (string input) |
| Translates an input string (null safe). More...
|
|
string | TranslateWithFormat (string baseString, params object[] args) |
| Constructs a formatted translation of input and parameters (null safe) More...
|
|
void | UpdateFont (Text text) |
| Applies the language's font (if any) to the text object More...
|
|
void | UpdateText (Text text) |
| Applies translation and font to the text object. More...
|
|
KSP.UI.Language.Language.Language |
( |
| ) |
|
|
inline |
void KSP.UI.Language.Language.ActivateAllFonts |
( |
| ) |
|
|
inline |
Will load all font assets (for use in settings screen)
< pull active font data
void KSP.UI.Language.Language.Awake |
( |
| ) |
|
|
inline |
void KSP.UI.Language.Language.DeactivateAllFonts |
( |
| ) |
|
|
inline |
Unloads all non-used font assets (for use on leaving settings screen)
< pull active font data
< first unload the font itself
string KSP.UI.Language.Language.GetLanguage |
( |
bool |
translate = false | ) |
|
|
inline |
Returns the name of the language (defaults to untranslated
- Parameters
-
- Returns
string KSP.UI.Language.Language.LanguageName |
( |
string |
language, |
|
|
out Font |
newFont |
|
) |
| |
|
inline |
Gets the translated name of the language, and the font to use (if any)
- Parameters
-
language | |
newFont | Null if language uses default font. |
- Returns
List<string> KSP.UI.Language.Language.LoadedFonts |
( |
| ) |
|
|
inline |
Gets a list (string) of all catalogued fonts
- Returns
List<string> KSP.UI.Language.Language.LoadedLanguages |
( |
| ) |
|
|
inline |
Gets a List (string) of all loaded languages
- Returns
void KSP.UI.Language.Language.LoadLanguage |
( |
string |
path, |
|
|
bool |
localPath = true |
|
) |
| |
|
inline |
Loads language from specified xml (path defaults to under GameData)
- Parameters
-
path | Path to xml file |
localPath | is path under GameData, or absolute? |
void KSP.UI.Language.Language.LoadLanguages |
( |
bool |
clear = true | ) |
|
|
inline |
Loads all languages in the Localisation folder under GameData
- Parameters
-
clear | Do we clear the existing database first? (default true) |
string KSP.UI.Language.Language.Save |
( |
| ) |
|
|
inline |
Placeholder for now, just returns the current language name. If we need to do more, we can.
- Returns
- The language name
void KSP.UI.Language.Language.SaveLanguages |
( |
| ) |
|
|
inline |
Saves the current state of all loaded languages.
void KSP.UI.Language.Language.SaveUntranslated |
( |
| ) |
|
|
inline |
Saves the list of found untranslated strings in all loaded languages.
bool KSP.UI.Language.Language.SetLanguage |
( |
string |
langName | ) |
|
|
inline |
Sets the currently active language if it exists, else returns false. Does nothing if language name already = this.
- Parameters
-
langName | the name of the language to switch to |
- Returns
- Did the switch succeed?
< if old font exists, destroy it (if not all loaded)
< get bundle for new font
< clear it as the new font data will hold the link
< failed to get a bundle so can't load font
string KSP.UI.Language.Language.Translate |
( |
string |
input | ) |
|
|
inline |
Translates an input string (null safe).
- Parameters
-
input | the string to translate |
- Returns
string KSP.UI.Language.Language.TranslateWithFormat |
( |
string |
baseString, |
|
|
params object[] |
args |
|
) |
| |
|
inline |
Constructs a formatted translation of input and parameters (null safe)
- Parameters
-
baseString | the base string to translate |
args | the arguments to format |
- Returns
- Translated constructed formatted string
void KSP.UI.Language.Language.UpdateFont |
( |
Text |
text | ) |
|
|
inline |
Applies the language's font (if any) to the text object
- Parameters
-
void KSP.UI.Language.Language.UpdateText |
( |
Text |
text | ) |
|
|
inline |
Applies translation and font to the text object.
- Parameters
-
Language KSP.UI.Language.Language.Instance |
|
staticget |
The documentation for this class was generated from the following file: