Esempio n. 1
0
        public static MultiLangText Create(EntityId languageKey, string text)
        {
            var result = new MultiLangText();

            result.SetText(languageKey, text);
            return(result);
        }
Esempio n. 2
0
        public string GetText(MultiLangText text, EntityId linkedObjectId = null)
        {
            var translation = text.GetTranslation(_context.CurrentLanguage);

            if (translation == null)
            {
                throw new InvalidOperationException($"Translation not found for selected language {_context.CurrentLanguage}, linked object = {linkedObjectId.ToString() ?? "UNKNOWN"}");
            }

            return(GetFilledString(translation));
        }
Esempio n. 3
0
 public Resource()
 {
     Value = new MultiLangText();
 }
Esempio n. 4
0
 public TextLine()
 {
     Text = new MultiLangText();
 }
Esempio n. 5
0
 public GoToLine()
 {
     Text = new MultiLangText();
 }
Esempio n. 6
0
 public CharacterAlias()
 {
     Title    = new MultiLangText();
     SpriteId = new ResourceId();
 }
Esempio n. 7
0
 public ChoiceLine()
 {
     Text = new MultiLangText();
 }
Esempio n. 8
0
 public Chapter()
 {
     Blocks = new EntityCollection <Block, CollectionOneIdFactory <Block> >();
     Title  = new MultiLangText();
 }