PenningtonUrlRequestCultureProvider Pennington.Localization
An IRequestCultureProvider that reads the locale from the URL path prefix and maps it to the closest CultureInfo for ASP.NET's request localization pipeline.
Constructors
.ctor
#public PenningtonUrlRequestCultureProvider(LocalizationOptions localization);Creates the provider.
Parameters
localizationLocalizationOptions
Methods
DetermineProviderCultureResult
#public Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext);Derives the request culture from the URL locale prefix.
Parameters
httpContextHttpContext
Returns
Task<ProviderCultureResult?>Pennington.Localization.PenningtonUrlRequestCultureProvider
namespace Pennington.Localization;
/// An IRequestCultureProvider that reads the locale from the URL path prefix and maps it to the closest CultureInfo for ASP.NET's request localization pipeline.
public class PenningtonUrlRequestCultureProvider
{
/// Creates the provider.
public PenningtonUrlRequestCultureProvider(LocalizationOptions localization);
/// Derives the request culture from the URL locale prefix.
public Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext);
}