Skip to content

Commit

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

namespace Insya.Localization
Expand All @@ -22,6 +22,26 @@ public static string Get(string id)
return _loc.GetLang(id);
}

/// <summary>
/// Example <item id="homepage">Home Page</item>
/// </summary>
/// <param name="id"></param>
/// <returns>xml item id</returns>
/// <returns>xml culture name</returns>
public static string Get(string id, string culture)
{
return _loc.GetLang(id, culture);
}

/// <summary>
/// Inline localization
/// </summary>
/// <param name="lang"></param>
public static string Get(Inline lang)
{
return _loc.GetLang(lang);
}

/// <summary>
/// Example <item id="homepage">Home Page</item>
/// </summary>
Expand All @@ -32,26 +52,26 @@ public static string Localize(string id)
return _loc.GetLang(id);
}


/// <summary>
/// Alternative calling Localize("id") or Get("id")
/// Example <item id="homepage">Home Page</item>
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static string Get(Inline lang)
/// <returns>xml item id</returns>
/// <returns>xml culture name</returns>
public static string Localize(string id, string culture)
{
return _loc.GetLang(lang);
return _loc.GetLang(id, culture);
}

/// <summary>
/// Inline localization
/// </summary>
/// <param name="lang"></param>
/// <returns>xml item id</returns>
public static string Localize(Inline lang)
{
return _loc.GetLang(lang);
}


}
}
}

0 comments on commit 61fccb7

Please sign in to comment.