Пример #1
0
        private bool RefreshUnits(string displayUnit)
        {
            customLocale.Reset();

            IDictionary <string, string> overridden = localizationProvider.GetOverriddenTranslations(OverrddenTranslationType);

            if (overridden == null || overridden.Count == 0)
            {
                return(false);
            }

            foreach (KeyValuePair <string, string> value in overridden)
            {
                string translated = value.Value.Replace(UnitPlaceholder, displayUnit);
                customLocale.AddLocalizedString(new Locale.Key {
                    m_Identifier = value.Key
                }, translated);
            }

            mainLocale.Merge(null, customLocale);
            return(true);
        }