view Lang/ModifiableTranslationSet.cs @ 69:b5d7e8b93205

Re #30: Improve Translations API * Add translation sets * Add reset method to translations * Fix translations where API documentation (contract) didn't match behaviour
author IBBoard <dev@ibboard.co.uk>
date Tue, 06 Apr 2010 15:41:20 +0000
parents
children 753be4b6c3b0
line wrap: on
line source

// This file (TranslationSet.cs) is a part of the IBBoard project and is copyright 2010 IBBoard
// 
// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.

using System;
using System.Collections.Generic;

namespace IBBoard.Lang
{
	/// <summary>
	/// A set of translations in a given language that allow setting of translations as well as getting
	/// </summary>
	public class ModifiableTranslationSet : AbstractTranslationSet
	{		
		public ModifiableTranslationSet(string languageCode) : base(languageCode)
		{
			//Do nothing extra
		}
		
		public string this[string key]
		{
			set
			{
				translations[key] = value;
			}
			get
			{
				return base[key];
			}
		}		
	}
}