diff options
| author | william341 <[email protected]> | 2017-05-28 12:37:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-28 12:37:00 -0700 |
| commit | 771c20cfb3a703e0f1550fdcf9eb07b78298c944 (patch) | |
| tree | 59cb532e15ebff313fdba2be264d78ec0033f407 /ShiftOS.WinForms/WFLanguageProvider.cs | |
| parent | 496b0cbf8659c99203f48210fd39c572400ae623 (diff) | |
| parent | c7ba7d733c756d196f98dd4533289a1ef4db715f (diff) | |
| download | shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.gz shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.bz2 shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.zip | |
Merge pull request #1 from shiftos-game/master
welp, no longer a dev.
Diffstat (limited to 'ShiftOS.WinForms/WFLanguageProvider.cs')
| -rw-r--r-- | ShiftOS.WinForms/WFLanguageProvider.cs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/ShiftOS.WinForms/WFLanguageProvider.cs b/ShiftOS.WinForms/WFLanguageProvider.cs index e762e7e..2a431f8 100644 --- a/ShiftOS.WinForms/WFLanguageProvider.cs +++ b/ShiftOS.WinForms/WFLanguageProvider.cs @@ -42,13 +42,25 @@ namespace ShiftOS.WinForms public string GetCurrentTranscript() { + try + { + return getDefault(); + } + catch (NullReferenceException) + { + return getDefault(); + } + } + + public string GetLanguagePath() + { switch (SaveSystem.CurrentSave.Language) { - case "deutsch - in beta": - return Properties.Resources.strings_de; + case "deutsch": + return Paths.GetPath("deutsch.local"); default: - return getDefault(); - + return Paths.GetPath("english.local"); + } } @@ -65,6 +77,11 @@ namespace ShiftOS.WinForms Utils.WriteAllText(Paths.GetPath("english.local"), getDefault()); } + public void WriteTranscript() + { + Utils.WriteAllText(GetLanguagePath(), GetCurrentTranscript()); + } + private string getDefault() { return Properties.Resources.strings_en; |
