Beispiel #1
0
        void PopulateLanguges()
        {
            AWAPI_BusinessLibrary.library.CultureLibrary lib = new AWAPI_BusinessLibrary.library.CultureLibrary();
            _culture.DataSource     = lib.GetListBySiteId(App_Code.SessionInfo.CurrentSite.siteId);
            _culture.DataValueField = "cultureCode";
            _culture.DataTextField  = "title";
            _culture.DataBind();

            _culture.Items.Insert(0, new ListItem("None", ""));
            if (!String.IsNullOrEmpty(App_Code.SessionInfo.CurrentSite.cultureCode) &&
                _culture.Items.FindByValue(App_Code.SessionInfo.CurrentSite.cultureCode) != null)
            {
                _culture.SelectedValue     = App_Code.SessionInfo.CurrentSite.cultureCode;
                _culture.SelectedItem.Text = _culture.SelectedItem.Text + " (default)";
            }
            else
            {
                _culture.SelectedIndex = 0;
            }
        }
Beispiel #2
0
 void PopulateSiteCultures()
 {
     _culturesInSite.DataSource = _cultureLib.GetListBySiteId(SiteId);
     _culturesInSite.DataBind();
 }