Add() public method

public Add ( string tag, string translation ) : void
tag string
translation string
return void
Example #1
0
 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);
         }
     }
 }
Example #2
0
        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);
			}
		}