public bool LoadLanguage(string language, string json) { int languageInd = GetLanguageIndex(language); if (languageInd == -1) { TableData newTable = new TableData(); newTable.language = language; newTable.Generate(tables != null && tables.Length > 0 ? tables[0].entries : null); if (tables == null) { tables = new TableData[1]; } else { System.Array.Resize(ref tables, tables.Length + 1); } tables[tables.Length - 1] = newTable; } else { tables[languageInd].Generate(json, languageInd > 0 ? tables[0].entries : null); } return(true); }