aboutsummaryrefslogtreecommitdiff
path: root/Assets/Scripts/Localisation/TextLocaliserUI.cs
diff options
context:
space:
mode:
authorAlee <Alee14498@gmail.com>2019-06-10 12:13:55 -0400
committerAlee <Alee14498@gmail.com>2019-06-10 12:13:55 -0400
commit849c109ae26960be15722f01b9ea8230f4a2efc2 (patch)
tree961674ceb1569654fdd15a3bc80f0a30a27148e7 /Assets/Scripts/Localisation/TextLocaliserUI.cs
parent83bc89daf94153c9104589d5458a956fb629174c (diff)
downloadUnicity-849c109ae26960be15722f01b9ea8230f4a2efc2.tar.gz
Unicity-849c109ae26960be15722f01b9ea8230f4a2efc2.tar.bz2
Unicity-849c109ae26960be15722f01b9ea8230f4a2efc2.zip
Localisation (Working progress)
Diffstat (limited to 'Assets/Scripts/Localisation/TextLocaliserUI.cs')
-rw-r--r--Assets/Scripts/Localisation/TextLocaliserUI.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Assets/Scripts/Localisation/TextLocaliserUI.cs b/Assets/Scripts/Localisation/TextLocaliserUI.cs
new file mode 100644
index 0000000..a56afb0
--- /dev/null
+++ b/Assets/Scripts/Localisation/TextLocaliserUI.cs
@@ -0,0 +1,21 @@
+using System.Collections;
+using System.Collections.Generic;
+using TMPro;
+using UnityEngine;
+
+[RequireComponent(typeof(TextMeshProUGUI))]
+public class TextLocaliserUI : MonoBehaviour
+{
+ TextMeshProUGUI textField;
+
+ public string key;
+
+ // Start is called before the first frame update
+ void Start()
+ {
+ textField = GetComponent<TextMeshProUGUI>();
+ string value = LocalisationSystem.GetLocalisedValue(key);
+ textField.text = value;
+ }
+
+}