C# 클래스 System.Globalization.I18N

A transparent localizable class which represents the properties and methods that are needed in order to render a view that uses ASP.NET Razor syntax.
파일 보기 프로젝트 열기: adaptabi/i18N-Complete

공개 메소드들

메소드 설명
Format ( this culture, string text ) : string

@Alias _ and GetString

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

FormatHtml ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias __ and GetHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

FormatHtmlPlural ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias GetPluralHtml and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

FormatPlural ( this culture, string singular, string plural, int count ) : string

@Alias _ (1 underscore) and GetPluralString

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

FormatRaw ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias ___ (3 underscores) and GetRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

For each argument the escape func will be called before applying the format

FormatRaw ( this culture, string html, object>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, arguments) to the current culture language.

For each argument the escape func will be called before applying the format

FormatRawPlural ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias ___s (3 underscores and s) and GetPluralRaw

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

FormatRawPlural ( this culture, string singular, string plural, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias ___s (3 underscores and s) and GetPluralRaw

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

GetHtml ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias __ and FormatHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

GetPluralHtml ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias __ (2 underscores) and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

GetPluralRaw ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias ___s (3 underscores and s) and FormatRawPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

GetPluralRaw ( this culture, string singular, string plural, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias ___s (3 underscores and s) and FormatRawPlural

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

GetPluralString ( this culture, string singular, string plural, int count ) : string

@Alias _ (1 underscore) and FormatPlural

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

GetRaw ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

GetRaw ( this culture, string html, object>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

GetString ( this culture, string text ) : string

@Alias _ and Format

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

_ ( this culture, string text ) : string

@Alias GetString and Format

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

__ ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias GetHtml and FormatHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

___ ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

@Alias GetRaw and FormatRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

___ ( this culture, string html, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias GetRaw and FormatRaw

Translates the given html applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

___q ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

Quotes the text as the xgettext cannot correctly extract values from attributes

Translates the given html applying '"'+HttpUtility.HtmlAttributeEncode(string.Format(html, htmlArguments))+'"' to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

Usage: <div title=@___q("< class='tip'>There are {0} {1} in cart.</div>", 3, "<b>Items</b>")>... -- Note the missing quotes!

___s ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias GetPluralRaw and FormatRawPlural

Translates the given singular or plural HTML applying string.Format(html, arguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

___s ( this culture, string singularHTML, string pluralHTML, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString

@Alias GetPluralRaw and FormatRawPlural

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

__q ( this culture, string html ) : System.Web.Mvc.MvcHtmlString

Quotes the text as the xgettext cannot correctly extract values from attributes

Translates the given html applying '"'+HttpUtility.HtmlAttributeEncode(string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))))+'"' to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

Usage: <input type="submit" value=@__q("Save") /> -- Note the missing quotes!

__s ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString

@Alias GetPluralHtml and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

_s ( this culture, string singular, string plural, int count ) : string

@Alias GetPluralString and FormatPlural

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

메소드 상세

Format() 공개 정적인 메소드

@Alias _ and GetString

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

public static Format ( this culture, string text ) : string
culture this The culture being extended
text string The text to be translated
리턴 string

FormatHtml() 공개 정적인 메소드

@Alias __ and GetHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

public static FormatHtml ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

FormatHtmlPlural() 공개 정적인 메소드

@Alias GetPluralHtml and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

public static FormatHtmlPlural ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural text
리턴 System.Web.Mvc.MvcHtmlString

FormatPlural() 공개 정적인 메소드

@Alias _ (1 underscore) and GetPluralString

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

public static FormatPlural ( this culture, string singular, string plural, int count ) : string
culture this The culture being extended
singular string The text to be translated when count is 1
plural string The text to be translated when count is NOT 1
count int If count is 1 the singular text will be used, otherwise the plural text
리턴 string

FormatRaw() 공개 정적인 메소드

@Alias ___ (3 underscores) and GetRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

For each argument the escape func will be called before applying the format

public static FormatRaw ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

FormatRaw() 공개 정적인 메소드

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, arguments) to the current culture language.

For each argument the escape func will be called before applying the format

public static FormatRaw ( this culture, string html, object>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
escapeArgumentFunc object>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

FormatRawPlural() 공개 정적인 메소드

@Alias ___s (3 underscores and s) and GetPluralRaw

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static FormatRawPlural ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural HTML
리턴 System.Web.Mvc.MvcHtmlString

FormatRawPlural() 공개 정적인 메소드

@Alias ___s (3 underscores and s) and GetPluralRaw

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static FormatRawPlural ( this culture, string singular, string plural, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singular string The text/HTML to be translated when count is 1
plural string The text/HTML to be translated when count is NOT 1
count int If count is 1 the singular text/HTML will be used, otherwise the plural text
escapeArgumentFunc string>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

GetHtml() 공개 정적인 메소드

@Alias __ and FormatHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

public static GetHtml ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

GetPluralHtml() 공개 정적인 메소드

@Alias __ (2 underscores) and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

public static GetPluralHtml ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural text
리턴 System.Web.Mvc.MvcHtmlString

GetPluralRaw() 공개 정적인 메소드

@Alias ___s (3 underscores and s) and FormatRawPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static GetPluralRaw ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural HTML
리턴 System.Web.Mvc.MvcHtmlString

GetPluralRaw() 공개 정적인 메소드

@Alias ___s (3 underscores and s) and FormatRawPlural

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static GetPluralRaw ( this culture, string singular, string plural, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singular string The text/HTML to be translated when count is 1
plural string The text/HTML to be translated when count is NOT 1
count int If count is 1 the singular text/HTML will be used, otherwise the plural text
escapeArgumentFunc string>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

GetPluralString() 공개 정적인 메소드

@Alias _ (1 underscore) and FormatPlural

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

public static GetPluralString ( this culture, string singular, string plural, int count ) : string
culture this The culture being extended
singular string The text to be translated when count is 1
plural string The text to be translated when count is NOT 1
count int If count is 1 the singular text will be used, otherwise the plural text
리턴 string

GetRaw() 공개 정적인 메소드

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

public static GetRaw ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

GetRaw() 공개 정적인 메소드

@Alias ___ (3 underscores) and FormatRaw

Translates the given html applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static GetRaw ( this culture, string html, object>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
escapeArgumentFunc object>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

GetString() 공개 정적인 메소드

@Alias _ and Format

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

public static GetString ( this culture, string text ) : string
culture this The culture being extended
text string The text to be translated
리턴 string

_() 공개 정적인 메소드

@Alias GetString and Format

Translates the given text applying string.Format(text, arguments) to the current culture language.

The text and argument values will be HTML Encoded when used in ASP.NET MVC

public static _ ( this culture, string text ) : string
culture this The culture being extended
text string The text to be translated
리턴 string

__() 공개 정적인 메소드

@Alias GetHtml and FormatHtml

Translates the given html applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

public static __ ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

___() 공개 정적인 메소드

@Alias GetRaw and FormatRaw

Translates the given html applying string.Format(html, htmlArguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

public static ___ ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html to be translated
리턴 System.Web.Mvc.MvcHtmlString

___() 공개 정적인 메소드

@Alias GetRaw and FormatRaw

Translates the given html applying string.Format(html, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static ___ ( this culture, string html, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The text to be translated
escapeArgumentFunc string>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

___q() 공개 정적인 메소드

Quotes the text as the xgettext cannot correctly extract values from attributes

Translates the given html applying '"'+HttpUtility.HtmlAttributeEncode(string.Format(html, htmlArguments))+'"' to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

Usage: <div title=@___q("< class='tip'>There are {0} {1} in cart.</div>", 3, "<b>Items</b>")>... -- Note the missing quotes!

public static ___q ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html text to be translated
리턴 System.Web.Mvc.MvcHtmlString

___s() 공개 정적인 메소드

@Alias GetPluralRaw and FormatRawPlural

Translates the given singular or plural HTML applying string.Format(html, arguments) to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

public static ___s ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural HTML
리턴 System.Web.Mvc.MvcHtmlString

___s() 공개 정적인 메소드

@Alias GetPluralRaw and FormatRawPlural

Translates the given singular or plural text/html applying string.Format(count == 1 ? singular : plural, arguments.Select(a => escapeArgumentFunc(a))) to the current culture language.

For each argument the escape func will be called before applying the format

public static ___s ( this culture, string singularHTML, string pluralHTML, int count, string>.Func escapeArgumentFunc ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The text/HTML to be translated when count is 1
pluralHTML string The text/HTML to be translated when count is NOT 1
count int If count is 1 the singular text/HTML will be used, otherwise the plural text
escapeArgumentFunc string>.Func The func to be applied for each argument .i.e. a => HttpUtility.HtmlAttributeEncode(a)
리턴 System.Web.Mvc.MvcHtmlString

__q() 공개 정적인 메소드

Quotes the text as the xgettext cannot correctly extract values from attributes

Translates the given html applying '"'+HttpUtility.HtmlAttributeEncode(string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))))+'"' to the current culture language.

The html will be kept as it is, while arguments will be automatically HTML Encoded

Usage: <input type="submit" value=@__q("Save") /> -- Note the missing quotes!

public static __q ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html text to be translated
리턴 System.Web.Mvc.MvcHtmlString

__s() 공개 정적인 메소드

@Alias GetPluralHtml and FormatHtmlPlural

Translates the given singular or plural HTML applying string.Format(html, arguments.Select(a => HttpUtility.HtmlEncode(a))) to the current culture language.

The singular/plural HTML will be kept as it is, while arguments will be automatically HTML Encoded

public static __s ( this culture, string singularHTML, string pluralHTML, int count ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
singularHTML string The HTML to be translated when count is 1
pluralHTML string The HTML to be translated when count is NOT 1
count int If count is 1 the singular HTML will be used, otherwise the plural text
리턴 System.Web.Mvc.MvcHtmlString

_s() 공개 정적인 메소드

@Alias GetPluralString and FormatPlural

Translates the given singular or plural text applying string.Format(text, arguments) to the current culture language.

The singular/plural text and argument values will be HTML Encoded when used in ASP.NET MVC

public static _s ( this culture, string singular, string plural, int count ) : string
culture this The culture being extended
singular string The text to be translated when count is 1
plural string The text to be translated when count is NOT 1
count int If count is 1 the singular text will be used, otherwise the plural text
리턴 string