public bool Register(ILocalizedTextComponent element) { var list = RegisteredTextElements; if (list.Contains(element)) { return(false); } list.Add(element); Manager.UpdateText(element); return(true); }
public void UpdateText(ILocalizedTextComponent localizedText) { var id = localizedText.Id; var vocabulary = Languages[_activeLanguage].Vocabulary; if (!vocabulary.ContainsKey(id)) { return; } var value = vocabulary[id]; localizedText.SetText(value); }
public bool Unregister(ILocalizedTextComponent element) { return(RegisteredTextElements.Remove(element)); }