public void Initialize() { OverallInitializer.Initialize(); mPlugin = new ScriptParsingPlugin(); mPlugin.StartUpForTests(); mExpressionParser = new ExpressionParser(); mExpressionParser.LogStringBuilder = mLog; CreateElementRuntime("ExpressionParserTestEntity"); CreateParentElementRuntime(); List <string> languages = new List <string>(); languages.Add("ID"); languages.Add("English"); languages.Add("Spanish"); Dictionary <string, string[]> entries = new Dictionary <string, string[]>(); entries.Add("T_Test", new string[] { "T_Test", "Test in English", "Test in Spanish" }); LocalizationManager.AddDatabase(entries, languages); }
private static void LoadLocalization() { if (GlueProjectSave.UsesTranslation) { List <ReferencedFileSave> allRfses = GlueProjectSave.GetAllReferencedFiles(); foreach (ReferencedFileSave rfs in allRfses) { if (rfs.IsDatabaseForLocalizing) { string fullFileName = ElementRuntime.ContentDirectory + rfs.Name; try { LocalizationManager.AddDatabase( fullFileName, rfs.CsvDelimiter.ToChar()); } catch (Exception e) { MessageBox.Show("Error loading localization database:\n\n" + fullFileName + "\n\n" + e.Message); } break; } } } }