public string FindMissingText(StringToken key, CultureInfo culture)
        {
            var defaultValue = culture.Name + "_" + key.ToLocalizationKey();

            if (key.DefaultValue.IsNotEmpty() && culture.Equals(_defaultCulture))
            {
                defaultValue = key.DefaultValue;
            }

            _storage.WriteMissing(key.ToLocalizationKey().ToString(), defaultValue, culture);

            return(defaultValue);
        }
Ejemplo n.º 2
0
 private void writeMissing(string key, string defaultValue, CultureInfo culture)
 {
     try
     {
         _storage.WriteMissing(key, defaultValue, culture);
     }
     catch (Exception e)
     {
         _logger.LogDebug("Could not write missing key {0} to xml storage. Continuing with the default value {1} Exception: {2}", key, defaultValue, e);
     }
 }