diff options
Diffstat (limited to 'Thronefall/I2.Loc/Example_ChangeLanguage.cs')
| -rw-r--r-- | Thronefall/I2.Loc/Example_ChangeLanguage.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Thronefall/I2.Loc/Example_ChangeLanguage.cs b/Thronefall/I2.Loc/Example_ChangeLanguage.cs new file mode 100644 index 0000000..69819ad --- /dev/null +++ b/Thronefall/I2.Loc/Example_ChangeLanguage.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +namespace I2.Loc; + +public class Example_ChangeLanguage : MonoBehaviour +{ + public void SetLanguage_English() + { + SetLanguage("English"); + } + + public void SetLanguage_French() + { + SetLanguage("French"); + } + + public void SetLanguage_Spanish() + { + SetLanguage("Spanish"); + } + + public void SetLanguage(string LangName) + { + if (LocalizationManager.HasLanguage(LangName)) + { + LocalizationManager.CurrentLanguage = LangName; + } + } +} |
