HKI Core
Classes | Public Member Functions | Private Attributes | List of all members
HKI.Core.Loc.TextLocalization Class Reference

This ScriptableObject contains as a container for all text localization information. More...

Inheritance diagram for HKI.Core.Loc.TextLocalization:

Classes

class  TextLocalizationElement
 This subclass holds the data for a text localization in a specific language. More...
 

Public Member Functions

string GetText (Language language)
 This function returns the string in a specific language. If there is no localization element in the right language it returns a localization in the default aka fallback language. More...
 
string GetText (SystemLanguage language)
 Alternative way of getting the localized string with SystemLanguage as input. More...
 
string GetDefaultText ()
 This functions returns the default localization this will be the first TextElement. In the case there is no localization at all an empty string will be returned. More...
 

Private Attributes

List< TextLocalizationElementTextLocalizationElements = new List<TextLocalizationElement>()
 This variable holds all localizations for all languages. More...
 

Detailed Description

This ScriptableObject contains as a container for all text localization information.

Definition at line 10 of file TextLocalization.cs.

Member Function Documentation

◆ GetDefaultText()

string HKI.Core.Loc.TextLocalization.GetDefaultText ( )
inline

This functions returns the default localization this will be the first TextElement. In the case there is no localization at all an empty string will be returned.

Returns

Definition at line 67 of file TextLocalization.cs.

◆ GetText() [1/2]

string HKI.Core.Loc.TextLocalization.GetText ( Language  language)
inline

This function returns the string in a specific language. If there is no localization element in the right language it returns a localization in the default aka fallback language.

Parameters
language
Returns

Definition at line 39 of file TextLocalization.cs.

◆ GetText() [2/2]

string HKI.Core.Loc.TextLocalization.GetText ( SystemLanguage  language)
inline

Alternative way of getting the localized string with SystemLanguage as input.

Parameters
language
Returns

Definition at line 52 of file TextLocalization.cs.

Member Data Documentation

◆ TextLocalizationElements

List<TextLocalizationElement> HKI.Core.Loc.TextLocalization.TextLocalizationElements = new List<TextLocalizationElement>()
private

This variable holds all localizations for all languages.

Definition at line 31 of file TextLocalization.cs.


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