Beispiel #1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            var locales = Factory.Instance.CreateStoreSettingsProvider().GetLocales();

            ddlLangs.DataTextField  = "NativeName";
            ddlLangs.DataValueField = "Code";
            ddlLangs.DataSource     = locales;
            ddlLangs.DataBind();

            var locale   = HccRequestContextUtils.GetAdminContentCulture();
            var listItem = ddlLangs.Items.FindByValue(locale.Code);

            if (listItem != null)
            {
                listItem.Selected = true;
            }
        }
Beispiel #2
0
 public static HccLocale GetAdminContentCulture()
 {
     return(HccRequestContextUtils.GetAdminContentCulture());
 }