private static void A() { TextBlock textBlock = TextBlockUtils.LoadFromVirtualFile(ToolsLocalization.EL); if (textBlock != null) { TextBlock textBlock2 = textBlock.FindChild("groups"); if (textBlock2 != null) { foreach (TextBlock current in textBlock2.Children) { if (!(current.Name != "group")) { string data = current.Data; ToolsLocalization.GroupItem groupItem = new ToolsLocalization.GroupItem(data); ToolsLocalization.EM.Add(data, groupItem); foreach (TextBlock.Attribute current2 in current.Attributes) { groupItem.em.Add(current2.Name, current2.Value); } } } } } }
private static ToolsLocalization.GroupItem A(string text) { ToolsLocalization.GroupItem groupItem; if (ToolsLocalization.EM.TryGetValue(text, out groupItem)) { return(groupItem); } groupItem = new ToolsLocalization.GroupItem(text); ToolsLocalization.EM.Add(text, groupItem); return(groupItem); }
public static string Translate(string groupName, string text) { if (ToolsLocalization.IsInitialized && !string.IsNullOrEmpty(text)) { ToolsLocalization.GroupItem groupItem = ToolsLocalization.A(groupName); if (groupItem != null) { string text2; if (groupItem.em.TryGetValue(text, out text2)) { if (!string.IsNullOrEmpty(text2)) { return(text2); } } else { ToolsLocalization.El = true; groupItem.em.Add(text, ""); } } } return(text); }