2 using System.Collections.Generic;
7 using PostSharp.Patterns.Contracts;
14 private readonly Dictionary<string, string> germanDictionary =
new Dictionary<string, string>();
20 this.ReadGermanDictionary();
27 private void ReadGermanDictionary()
30 StreamReader file =
new StreamReader(
"Deutsch.txt");
31 while ((line = file.ReadLine()) != null)
33 Console.WriteLine(line);
34 string[] values = line.Split(
'#');
36 this.germanDictionary.Add(values[0], values[1]);
54 if(this.germanDictionary.ContainsKey(englishString))
55 return this.germanDictionary[englishString];
string GetString(string englishString, Language language)
Gets the translated string.
Class for creating a singleton for a generic class
static T Instance
Gets the instance.