In the section Configure Localization middleware it is mentioned how to configure the localization middleware but it isn't mentioned how to apply them. I would suggest adding the line app.UseRequestLocalization(app.Services.GetRequiredService<IOptions<RequestLocalizationOptions>>().Value); to the code block.
Description
In the section
Configure Localization middleware
it is mentioned how to configure the localization middleware but it isn't mentioned how to apply them. I would suggest adding the lineapp.UseRequestLocalization(app.Services.GetRequiredService<IOptions<RequestLocalizationOptions>>().Value);
to the code block.Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization/select-language-culture?view=aspnetcore-8.0#configure-localization-middleware
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/localization/select-language-culture.md#configure-localization-middleware
Document ID
b4841fb3-f720-fdc5-851c-80d336abfbe1
Article author
@Rick-Anderson