Example #1
0
        public static MultiLangText Create(EntityId languageKey, string text)
        {
            var result = new MultiLangText();

            result.SetText(languageKey, text);
            return(result);
        }
Example #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));
        }
Example #3
0
 public Resource()
 {
     Value = new MultiLangText();
 }
Example #4
0
 public TextLine()
 {
     Text = new MultiLangText();
 }
Example #5
0
 public GoToLine()
 {
     Text = new MultiLangText();
 }
Example #6
0
 public CharacterAlias()
 {
     Title    = new MultiLangText();
     SpriteId = new ResourceId();
 }
Example #7
0
 public ChoiceLine()
 {
     Text = new MultiLangText();
 }
Example #8
0
 public Chapter()
 {
     Blocks = new EntityCollection <Block, CollectionOneIdFactory <Block> >();
     Title  = new MultiLangText();
 }