Ejemplo n.º 1
0
 /// <summary>
 /// Gets the default admin language.
 /// </summary>
 /// <returns></returns>
 public static string GetAdminLanguageByDefault()
 {
     //var entity = LanguageFactory.Instance.GetByDefault();
     //if (entity != null)
     //{
     //    CookiesUtility.SetCookie(SessionKey.KEY_ADMIN_LANGUAGE, entity.Id, 7);
     //    CookiesUtility.SetCookie(SessionKey.KEY_ADMIN_UI_LANGUAGE, entity.Id, 7);
     //}
     CookiesUtility.SetCookie(SessionKey.KEY_ADMIN_LANGUAGE, LanguageSetting.Setting.DefaultLanguage, 7);
     CookiesUtility.SetCookie(SessionKey.KEY_ADMIN_UI_LANGUAGE, LanguageSetting.Setting.DefaultLanguage, 7);
     return(string.Empty);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the current admin language.
 /// </summary>
 /// <param name="languageId">The language id.</param>
 public static void SetCurrentAdminLanguage(string languageId)
 {
     CookiesUtility.SetCookie(SessionKey.KEY_ADMIN_LANGUAGE, languageId, 7);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Gets the current admin UI language.
 /// </summary>
 /// <returns></returns>
 public static string GetCurrentAdminUILanguage()
 {
     return(!string.IsNullOrEmpty(CookiesUtility.GetCookie(SessionKey.KEY_ADMIN_UI_LANGUAGE))
         ? CookiesUtility.GetCookie(SessionKey.KEY_ADMIN_UI_LANGUAGE)
         : GetAdminLanguageByDefault());
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the current UI language.
 /// </summary>
 /// <param name="uiLanguageId">The UI language id.</param>
 public static void SetCurrentUILanguage(string uiLanguageId)
 {
     CookiesUtility.SetCookie(SessionKey.KEY_UI_LANGUAGE, uiLanguageId, 7);
 }