This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

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

PenningtonUrlRequestCultureProvider

#
public PenningtonUrlRequestCultureProvider(LocalizationOptions localization)

Creates the provider.

Parameters

localization LocalizationOptions

Methods

DetermineProviderCultureResult

#
public Task<ProviderCultureResult> DetermineProviderCultureResult(HttpContext httpContext)

Derives the request culture from the URL locale prefix.

Parameters

httpContext HttpContext

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
{
    /// Derives the request culture from the URL locale prefix.
    
public Task<ProviderCultureResult> DetermineProviderCultureResult(HttpContext httpContext)
; /// Creates the provider.
public PenningtonUrlRequestCultureProvider(LocalizationOptions localization)
; }