mattercontrol/LocalizedString.cs
larsbrubaker c6f471c7ca Fixing up the localization file to always maintain the master file when in English
added localized start and end to gcode view
Made the TAZ baud rate correct
Some new localizations
2014-03-15 14:02:43 -07:00

31 lines
952 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//#define DEBUG_SHOW_TRANSLATED_STRINGS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using MatterHackers.MatterControl.DataStorage;
namespace MatterHackers.Localizations
{
public static class LocalizedString
{
static TranslationMap MatterControlTranslationMap;
public static string Get(string EnglishText)
{
string language = "en";
if (MatterControlTranslationMap == null)
{
string pathToTranslationsFolder = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "Translations");
MatterControlTranslationMap = new TranslationMap(pathToTranslationsFolder, language);
}
#if DEBUG_SHOW_TRANSLATED_STRINGS && DEBUG
return "El " + EnglishText + " o";
#endif
return MatterControlTranslationMap.Translate(EnglishText);
}
}
}