Пример #1
0
        private void OnRepositoryStateReady(LocalizationState state)
        {
            var language = state.language;

            this.UpdateLanguage(language);
            this.OnInitializedEvent?.Invoke();
        }
Пример #2
0
        public void UpdateLanguage(SystemLanguage language)
        {
            var state = new LocalizationState
            {
                language = language
            };

            this.dao.SetState(state);
        }
Пример #3
0
        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);
        }