Ejemplo n.º 1
0
            public PublishedCultureInfo GetCulture(string culture = null)
            {
                // handle context culture
                if (culture == null)
                {
                    culture = _variationContextAccessor.VariationContext.Culture;
                }

                // no invariant culture infos
                if (culture == "")
                {
                    return(null);
                }

                // get
                return(Cultures.TryGetValue(culture, out var cultureInfos) ? cultureInfos : null);
            }
Ejemplo n.º 2
0
        public bool TryGetCulture(string key, out Culture cul)
        {
            bool found = false;

            if (m_useCustomCulture)
            {
                found = m_customCultures.TryGetValue(key, out cul);
            }

            if (!found)
            {
                found = Cultures.TryGetValue(key, out cul);
            }

            cul = null;
            return(found);
        }