private void OnRepositoryStateReady(LocalizationState state) { var language = state.language; this.UpdateLanguage(language); this.OnInitializedEvent?.Invoke(); }
public void UpdateLanguage(SystemLanguage language) { var state = new LocalizationState { language = language }; this.dao.SetState(state); }
public override IEnumerator CheckForUpdates(Reference <bool> isUpdated = null) { if (this.dao.HasState()) { yield break; } var language = UnityEngine.Application.systemLanguage; var config = this.content.config; if (!config.IsLanguageSupported(language)) { language = config.defaultLanguage; } var state = new LocalizationState { language = language }; this.dao.SetState(state); }