AcceptLanguageHeaderRequestCultureProvider Class¶
Determines the culture information for a request via the value of the Accept-Language header.
- Namespace
Microsoft.AspNetCore.Localization
- Assemblies
- Microsoft.AspNetCore.Localization
Syntax¶
public class AcceptLanguageHeaderRequestCultureProvider : RequestCultureProvider, IRequestCultureProvider
-
class
Microsoft.AspNetCore.Localization.
AcceptLanguageHeaderRequestCultureProvider
Methods¶
-
DetermineProviderCultureResult
(Microsoft.AspNetCore.Http.HttpContext)¶ Return type: System.Threading.Tasks.Task<Microsoft.AspNetCore.Localization.ProviderCultureResult> public override Task<ProviderCultureResult> DetermineProviderCultureResult(HttpContext httpContext)
-
Properties¶
-
Microsoft.AspNetCore.Localization.AcceptLanguageHeaderRequestCultureProvider.
MaximumAcceptLanguageHeaderValuesToTry
¶ The maximum number of values in the Accept-Language header to attempt to create a
System.Globalization.CultureInfo
from for the current request. Defaults to <code>3</code>.Return type: System.Int32 public int MaximumAcceptLanguageHeaderValuesToTry { get; set; }
-