Example #1
0
        public string Generate(CultureInfo culture, bool generateHash = false, bool useDefault = true)
        {
            var tokens = _localizationProvider.GetAllTokens();
            var result = GenerateXml(tokens.Select(x => new LocalString(x.Key.ToString(), useDefault ? x.Value.DefaultValue : _localizationProvider.GetText(x.Value, culture))), generateHash);

            return(result);
        }
Example #2
0
 public IEnumerable <LocalizedString> GetAllStrings(bool includeAncestorCultures)
 {
     return(_localizationProvider.GetAllTokens().Select(x => new LocalizedString(x.Value.ToLocalizationKey().ToString(), x.Value.ToString(_cultureInfo))));
 }
Example #3
0
 public static IDictionary <LocalizationKey, StringToken> GetAllTokens()
 {
     return(_localizationProvider.GetAllTokens());
 }