public void CreateLocaleEntities(NodeAddedEvent e, LocaleListNode node, [JoinAll] UserNode user)
 {
     foreach (string str in node.localeList.Locales)
     {
         char[] separator = new char[] { '/' };
         string str2      = str.Split(separator)[1];
         if (!"tr".Equals(str2) || (user.userPublisher.Publisher == Publisher.CONSALA))
         {
             Entity entity = base.CreateEntity <LocaleTemplate>(str);
             Debug.Log("Language accepted!");
             node.simpleHorizontalList.AddItem(entity);
             entity.AddComponent(new ScreenGroupComponent(node.screenGroup.Key));
         }
     }
 }
        public void InitSelectedLocaleItem(NodeAddedEvent e, LocaleItemNode node, [Context, JoinByScreen] SelectedLocaleNode selected, [Context, JoinByScreen] LocaleListNode localesList)
        {
            LocaleComponent locale = node.locale;

            node.localeItem.SetText(locale.Caption, locale.LocalizedCaption);
            string savedLocaleCode = LocaleUtils.GetSavedLocaleCode();

            if (locale.Code == savedLocaleCode)
            {
                this.SetLocaleText(selected, node.locale);
                localesList.simpleHorizontalList.Select(node.Entity);
            }
        }
 public void ClearLocaleList(NodeRemoveEvent e, LocaleListNode list)
 {
     list.simpleHorizontalList.ClearItems(false);
 }