view Lang/ModifiableTranslationSet.cs @ 73:091bfa54d6c7

Re #33: Add method to get list of available translations * Add "translation language" object to pair up code and name * Load all translations at initialisation time Also: * Remove rogue "set" property on abstract translation set
author IBBoard <dev@ibboard.co.uk>
date Tue, 06 Apr 2010 18:58:30 +0000
parents 753be4b6c3b0
children b1ae6fce2e3f
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 void SetTranslation(string key, string translation)
		{
			translations[key] = translation;
		}
	}
}