summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs')
-rw-r--r--Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs b/Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs
new file mode 100644
index 0000000..108efdc
--- /dev/null
+++ b/Thronefall_1_57/Decompile/I2.Loc/SetLanguage.cs
@@ -0,0 +1,22 @@
+using UnityEngine;
+
+namespace I2.Loc;
+
+[AddComponentMenu("I2/Localization/SetLanguage Button")]
+public class SetLanguage : MonoBehaviour
+{
+ public string _Language;
+
+ private void OnClick()
+ {
+ ApplyLanguage();
+ }
+
+ public void ApplyLanguage()
+ {
+ if (LocalizationManager.HasLanguage(_Language))
+ {
+ LocalizationManager.CurrentLanguage = _Language;
+ }
+ }
+}