Skip to content

Commit

Permalink
Update LocalizationStartup.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinkuyu committed Jun 19, 2015
1 parent a36288c commit d2b3587
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/LocalizationStartup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @yasinkuyu
// @yasinkuyu
// 05/08/2014

using System;
Expand Down Expand Up @@ -50,7 +50,7 @@ public void ReadCookie()
/// </summary>
/// <param id="id">Xml localization item id</param>
/// <returns></returns>
public string GetLang(string id)
public string GetLang(string id, string _culture = "")
{
ReadCookie();

Expand All @@ -65,6 +65,9 @@ public string GetLang(string id)
if (string.IsNullOrEmpty(xmlFolderName))
Folder = xmlFolderName;

if (string.IsNullOrEmpty(_culture))
Culture = _culture;

string applicationName = string.Format("{0}_{1}_", Culture, uniqueApplicationName);

if (HttpContext.Current.Application[applicationName + id] == null)
Expand Down Expand Up @@ -112,4 +115,4 @@ public string SetLang(Language lang)
return null;
}
}
}
}

0 comments on commit d2b3587

Please sign in to comment.