diff options
Diffstat (limited to 'Assets/Scripts/Localisation/LocalisationSystem.cs')
| -rw-r--r-- | Assets/Scripts/Localisation/LocalisationSystem.cs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/Assets/Scripts/Localisation/LocalisationSystem.cs b/Assets/Scripts/Localisation/LocalisationSystem.cs deleted file mode 100644 index 3d48244..0000000 --- a/Assets/Scripts/Localisation/LocalisationSystem.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class LocalisationSystem -{ - public enum Language - { - English, - French - } - - public static Language language = Language.English; - - private static Dictionary<string, string> localisedEN; - private static Dictionary<string, string> localisedFR; - - public static bool isInit; - - public static void Init() - { - Debug.Log("Initalizing the localisation system..."); - CSVLoader csvLoader = new CSVLoader(); - csvLoader.LoadCSV(); - - localisedEN = csvLoader.GetDictionaryValues("en"); - localisedFR = csvLoader.GetDictionaryValues("fr"); - - isInit = true; - Debug.Log("Loaded the values for the localisation system."); - } - - public static string GetLocalisedValue(string key) - { - if (!isInit) { Init(); } - - string value = key; - - switch (language) - { - case Language.English: - localisedEN.TryGetValue(key, out value); - break; - case Language.French: - localisedFR.TryGetValue(key, out value); - break; - - } - - return value; - } - -} |
