static private OnGetting_ ( string defaultResult, |
||
defaultResult | string | The I18NComplete default result. Returning null will fallback on this result, otherwise return a custom value to oveerride this. |
culture | The culture this translation is being translated | |
text | string | The text to be translated |
arguments | object | Custom arguments list to be passed to string.Format |
return | string |
/// <summary> /// <para>@Alias <c>GetString</c> and <c>Format</c></para> /// <para>Translates the given text applying string.Format(text, arguments) to the current culture language. </para> /// <para>The text and argument values will be HTML Encoded when used in ASP.NET MVC</para> /// </summary> /// <param name="culture">The culture being extended</param> /// <param name="text">The text to be translated</param> /// <param name="arguments">Custom arguments list to be passed to string.Format</param> /// <returns>The translated formatted text as string</returns> /// <created author="laurentiu.macovei" date="Fri, 06 Jan 2012 23:47:10 GMT"/> public static string _(this CultureInfo culture, string text, params object[] arguments) { var result = string.Format(I18NComplete.GetText(text, lcid: culture.LCID), arguments); return (#if DEBUG I18NComplete.OnGetting_(result, culture, text, arguments) ?? #endif result); }