Exemple #1
0
            public Boolean IsSupportCulture(CultureInfo info)
            {
                if (info is null)
                {
                    throw new ArgumentNullException(nameof(info));
                }

                if (info.LCID == CultureUtils.Default || info.LCID == Default.LCID)
                {
                    return(true);
                }

                return(Supported.ContainsKey(info));
            }
Exemple #2
0
            public Boolean Update(CultureInfo info)
            {
                info ??= Default;

                if (info.IsCultureEquals(Culture))
                {
                    return(false);
                }

                if (!Supported.ContainsKey(info))
                {
                    return(false);
                }

                Culture = info;

                if (ChangeUIThreadLanguage)
                {
                    SetUILanguage();
                }

                LanguageChanged?.Invoke(Culture);
                return(true);
            }