view Lang/ModifiableTranslationSet.cs @ 110:a5714f82073d

* Add method for upper-casing just first character (based on DotNetPerls assertion that it is quicker this way) * Make sure languages capitalise (Benoit spotted Microsoft don't capitalise their French language French)
author IBBoard <dev@ibboard.co.uk>
date Fri, 20 Jan 2012 20:50:25 +0000
parents 90b9a3fe3c18
children
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 LGPL, 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
	{		
		private AbstractTranslationSet parentTranslationSet;
		
		public ModifiableTranslationSet(string languageCode) : base(languageCode)
		{
			//Do nothing extra
		}
		
		public void SetTranslation(string key, string translation)
		{
			translations[key] = translation;
		}

		public void SetParentTranslations(ModifiableTranslationSet parentTranslations)
		{
			parentTranslationSet = parentTranslations;
		}
		
		protected override AbstractTranslationSet GetParentTranslations()
		{
			return parentTranslationSet;
		}

	}
}