Mercurial > repos > IBBoard
annotate 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 |
rev | line source |
---|---|
69 | 1 // This file (TranslationSet.cs) is a part of the IBBoard project and is copyright 2010 IBBoard |
2 // | |
3 // 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. | |
4 | |
5 using System; | |
6 using System.Collections.Generic; | |
7 | |
8 namespace IBBoard.Lang | |
9 { | |
10 /// <summary> | |
11 /// A set of translations in a given language that allow setting of translations as well as getting | |
12 /// </summary> | |
13 public class ModifiableTranslationSet : AbstractTranslationSet | |
14 { | |
15 public ModifiableTranslationSet(string languageCode) : base(languageCode) | |
16 { | |
17 //Do nothing extra | |
18 } | |
19 | |
70
753be4b6c3b0
Re #31: Break out Translations for language to own class
IBBoard <dev@ibboard.co.uk>
parents:
69
diff
changeset
|
20 public void SetTranslation(string key, string translation) |
69 | 21 { |
70
753be4b6c3b0
Re #31: Break out Translations for language to own class
IBBoard <dev@ibboard.co.uk>
parents:
69
diff
changeset
|
22 translations[key] = translation; |
753be4b6c3b0
Re #31: Break out Translations for language to own class
IBBoard <dev@ibboard.co.uk>
parents:
69
diff
changeset
|
23 } |
69 | 24 } |
25 } |