RequestCulture Class¶
Details about the culture for an Microsoft.AspNetCore.Http.HttpRequest
.
- Namespace
Microsoft.AspNetCore.Localization
- Assemblies
- Microsoft.AspNetCore.Localization
Constructors¶
-
RequestCulture
(System.Globalization.CultureInfo)¶ Creates a new
Microsoft.AspNetCore.Localization.RequestCulture
object has itsMicrosoft.AspNetCore.Localization.RequestCulture.Culture
andMicrosoft.AspNetCore.Localization.RequestCulture.UICulture
properties set to the sameSystem.Globalization.CultureInfo
value.Arguments: culture (System.Globalization.CultureInfo) – The System.Globalization.CultureInfo
for the request.public RequestCulture(CultureInfo culture)
-
RequestCulture
(System.Globalization.CultureInfo, System.Globalization.CultureInfo) Creates a new
Microsoft.AspNetCore.Localization.RequestCulture
object has itsMicrosoft.AspNetCore.Localization.RequestCulture.Culture
andMicrosoft.AspNetCore.Localization.RequestCulture.UICulture
properties set to the respectiveSystem.Globalization.CultureInfo
values provided.Arguments: - culture (System.Globalization.CultureInfo) – The
System.Globalization.CultureInfo
for the request to be used for formatting. - uiCulture (System.Globalization.CultureInfo) – The
System.Globalization.CultureInfo
for the request to be used for text, i.e. language.
public RequestCulture(CultureInfo culture, CultureInfo uiCulture)
- culture (System.Globalization.CultureInfo) – The
-
RequestCulture
(System.String) Creates a new
Microsoft.AspNetCore.Localization.RequestCulture
object has itsMicrosoft.AspNetCore.Localization.RequestCulture.Culture
andMicrosoft.AspNetCore.Localization.RequestCulture.UICulture
properties set to the sameSystem.Globalization.CultureInfo
value.Arguments: culture (System.String) – The culture for the request. public RequestCulture(string culture)
-
RequestCulture
(System.String, System.String) Creates a new
Microsoft.AspNetCore.Localization.RequestCulture
object has itsMicrosoft.AspNetCore.Localization.RequestCulture.Culture
andMicrosoft.AspNetCore.Localization.RequestCulture.UICulture
properties set to the respectiveSystem.Globalization.CultureInfo
values provided.Arguments: - culture (System.String) – The culture for the request to be used for formatting.
- uiCulture (System.String) – The culture for the request to be used for text, i.e. language.
public RequestCulture(string culture, string uiCulture)
-
Properties¶
-
Microsoft.AspNetCore.Localization.RequestCulture.
Culture
¶ Gets the
System.Globalization.CultureInfo
for the request to be used for formatting.Return type: System.Globalization.CultureInfo public CultureInfo Culture { get; }
-
Microsoft.AspNetCore.Localization.RequestCulture.
UICulture
¶ Gets the
System.Globalization.CultureInfo
for the request to be used for text, i.e. language;Return type: System.Globalization.CultureInfo public CultureInfo UICulture { get; }
-