Use language from /.minecraft/assets

If the language file is not found but file
%appdata%/.minecraft/assets/en_US.lang exists, use it instead.
This commit is contained in:
ORelio 2013-08-12 15:05:36 +02:00
parent ff950a5248
commit b42a400582
2 changed files with 6 additions and 0 deletions

View file

@ -95,6 +95,11 @@ namespace MinecraftClient
TranslationRules["commands.message.display.incoming"] = "§7%s whispers to you: %s";
TranslationRules["commands.message.display.outgoing"] = "§7You whisper to %s: %s";
//Use translations from Minecraft assets if a copy of the game is installed?
if (!System.IO.File.Exists(Settings.TranslationsFile)
&& System.IO.File.Exists(Settings.TranslationsFile_FromMCDir))
{ Settings.TranslationsFile = Settings.TranslationsFile_FromMCDir; }
//Load an external dictionnary of translation rules
if (System.IO.File.Exists(Settings.TranslationsFile))
{

View file

@ -23,6 +23,7 @@ namespace MinecraftClient
public static string SingleCommand = "";
//Other Settings
public static string TranslationsFile_FromMCDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\.minecraft\assets\lang\en_US.lang";
public static string TranslationsFile = "translations.lang";
public static string Bots_OwnersFile = "bot-owners.txt";