From 61fccb7dc546cf48d7d87125a44ea41c393e4e40 Mon Sep 17 00:00:00 2001 From: Yasin Kuyu Date: Fri, 19 Jun 2015 03:43:17 +0300 Subject: [PATCH] Update Localization.cs --- src/Localization.cs | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/Localization.cs b/src/Localization.cs index bb00b55..303b6e6 100644 --- a/src/Localization.cs +++ b/src/Localization.cs @@ -1,4 +1,4 @@ -// @yasinkuyu +// @yasinkuyu // 05/08/2014 namespace Insya.Localization @@ -22,6 +22,26 @@ public static string Get(string id) return _loc.GetLang(id); } + /// + /// Example Home Page + /// + /// + /// xml item id + /// xml culture name + public static string Get(string id, string culture) + { + return _loc.GetLang(id, culture); + } + + /// + /// Inline localization + /// + /// + public static string Get(Inline lang) + { + return _loc.GetLang(lang); + } + /// /// Example Home Page /// @@ -32,26 +52,26 @@ public static string Localize(string id) return _loc.GetLang(id); } - /// - /// Alternative calling Localize("id") or Get("id") + /// Example Home Page /// /// - /// - public static string Get(Inline lang) + /// xml item id + /// xml culture name + public static string Localize(string id, string culture) { - return _loc.GetLang(lang); + return _loc.GetLang(id, culture); } /// /// Inline localization /// /// - /// xml item id public static string Localize(Inline lang) { return _loc.GetLang(lang); } + } -} \ No newline at end of file +}