Repair code block links (#9030)

pull/9035/head
Luke Latham 2018-10-15 11:56:23 -05:00 committed by GitHub
parent fc719ac941
commit 13b70b1485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -201,9 +201,9 @@ Each language and culture combination (other than the default language) requires
### Configure localization
Localization is configured in the `ConfigureServices` method:
Localization is configured in the `Startup.ConfigureServices` method:
[!code-csharp[](localization/sample/Localization/Program.cs?name=snippet1)]
[!code-csharp[](localization/sample/Localization/Startup.cs?name=snippet1)]
* `AddLocalization` Adds the localization services to the services container. The code above also sets the resources path to "Resources".
@ -213,9 +213,9 @@ Localization is configured in the `ConfigureServices` method:
### Localization middleware
The current culture on a request is set in the localization [Middleware](xref:fundamentals/middleware/index). The localization middleware is enabled in the `Configure` method. The localization middleware must be configured before any middleware which might check the request culture (for example, `app.UseMvcWithDefaultRoute()`).
The current culture on a request is set in the localization [Middleware](xref:fundamentals/middleware/index). The localization middleware is enabled in the `Startup.Configure` method. The localization middleware must be configured before any middleware which might check the request culture (for example, `app.UseMvcWithDefaultRoute()`).
[!code-csharp[](localization/sample/Localization/Program.cs?name=snippet2)]
[!code-csharp[](localization/sample/Localization/Startup.cs?name=snippet2)]
`UseRequestLocalization` initializes a `RequestLocalizationOptions` object. On every request the list of `RequestCultureProvider` in the `RequestLocalizationOptions` is enumerated and the first provider that can successfully determine the request culture is used. The default providers come from the `RequestLocalizationOptions` class: