private static void FillLocalizer(Localizer loc, ITemplateSet templates) { for (Template t = templates.GetNextTemplate(); t != null; t = templates.GetNextTemplate()) { if (string.IsNullOrEmpty(t.Translation)) { loc.Remove(t.Tag); } else { loc.Add(t.Tag, t.Translation); } } }
private Localizer CreateDefaultLocalizer() { Localizer loc = CreateLocalizer(null, _defaultculture.Name, _providers); if (loc != null) { if (_overrides != null) { foreach (KeyValuePair <string, string> entry in _overrides) { loc.Add(entry.Key, entry.Value); } } return(loc); } return(new Localizer(null)); }
private static void FillLocalizer (Localizer loc, ITemplateSet templates) { for (Template t = templates.GetNextTemplate(); t != null; t = templates.GetNextTemplate()) { if (string.IsNullOrEmpty(t.Translation)) loc.Remove(t.Tag); else loc.Add(t.Tag, t.Translation); } }