Exemplo n.º 1
0
 private void LoadLanguage()
 {
     if (Language == null)
     {
         Language language = languageCookieService.Get("Language");
         if (language?.KeyCode == null)
         {
             language = new Language("tr");
             languageCookieService.Set("Language", language, 60 * 24 * 7);
         }
         Language = language.KeyCode;
     }
 }
Exemplo n.º 2
0
 public string Get(EntityName entityName, PageType pageType)
 {
     if (IsUnLoaded)
     {
         Load();
         return(Get(entityName, pageType));
     }
     else
     {
         return(RouteTableElements?.FirstOrDefault(x =>
                                                   x.EntityName == entityName &&
                                                   x.LanguageKeyCode == languageCookieService.Get("CurrentLanguage").KeyCode&&
                                                   x.PageType == pageType)?.Content);
     }
 }