Skip to main content

Class WorldWide

Declaration
public class WorldWide : AsyncSingletonBehaviour<WorldWide>

Properties

ActiveLanguageCode

Declaration
public static string ActiveLanguageCode { get; }

Config

Instantiated LanguageConfig which can be found under MatchinghamGames/Resources/Config/ path

Declaration
public static LanguageConfig Config { get; }

ActiveLocales

These are selected locales

Declaration
public List<Locale> ActiveLocales { get; }

MainService

This is the MainHelper that is uses the main data store which can be found under MatchinghamGames/Resources/Config/

Declaration
public ILocalizeService MainService { get; }

Fields

ActiveHelpers

These are all the helpers created

Declaration
public static List<BaseLocalizeHelper> ActiveHelpers

Methods

SetService(string, ILocalizeService)

Declaration
public static void SetService(string name, ILocalizeService service)
Parameters
TypeName
System.Stringname
MatchinghamGames.Localization.Models.ILocalizeServiceservice

TryGetSpecialFontAsset(string, out SerializedFontData)

Declaration
public static bool TryGetSpecialFontAsset(string languageName, out SerializedFontData specialFontData)
Returns

System.Boolean

Parameters
TypeName
System.StringlanguageName
MatchinghamGames.Localization.Models.SerializedFontDataspecialFontData

Initialize(Action<InitializationResult>)

Declaration
protected override void Initialize(Action<InitializationResult> setResult)
Parameters
TypeName
System.Action<InitializationResult>setResult

InitializeDefault()

Declaration
public void InitializeDefault()

Get(string, string)

Declaration
public static string Get(string key, string fallback = "")
Returns

System.String

Parameters
TypeName
System.Stringkey
System.Stringfallback

GetFormatted(string, string, string)

Declaration
public static string GetFormatted(string key, string args0, string fallback)
Returns

System.String

Parameters
TypeName
System.Stringkey
System.Stringargs0
System.Stringfallback

GetFormatted(string, string, string, string)

Declaration
public static string GetFormatted(string key, string args0, string args1, string fallback)
Returns

System.String

Parameters
TypeName
System.Stringkey
System.Stringargs0
System.Stringargs1
System.Stringfallback

GetFormatted(string, string, string, string, string)

Declaration
public static string GetFormatted(string key, string args0, string args1, string args2, string fallback)
Returns

System.String

Parameters
TypeName
System.Stringkey
System.Stringargs0
System.Stringargs1
System.Stringargs2
System.Stringfallback

ChangeLanguageByCode(string)

Declaration
public bool ChangeLanguageByCode(string languageCode)
Returns

System.Boolean

Parameters
TypeName
System.StringlanguageCode

InvokeLanguageChange()

Declaration
public static void InvokeLanguageChange()

Events

OnLanguageChange

Subscribe to this to keep track of Language selection changes

Declaration
public static event UnityAction<string> OnLanguageChange
Event Type

Global.UnityAction<System.String>