@@ -557,7 +554,7 @@ public class CultureController : Controller
> [!WARNING]
> Use the action result to prevent open redirect attacks. For more information, see .
-The following `CultureSelector` component shows how to perform the initial redirection when the user selects a culture. The component is placed in the `Shared` folder for use throughout the app.
+The following `CultureSelector` component shows how to call the `Set` method of the `CultureController` with the new culture. The component is placed in the `Shared` folder for use throughout the app.
`Shared/CultureSelector.razor`:
@@ -841,7 +838,7 @@ Create resources for each locale. In the following example, resources are create
```
-The following component demonstrates the use of the localized `Greeting` string with .
+The following component demonstrates the use of the localized `Greeting` string with . The Razor markup `@Loc["Greeting"]` in the following example localizes the string keyed to the `Greeting` value, which is set in the preceding resource files.
Add the namespace for to the app's `_Imports.razor` file:
@@ -882,15 +879,7 @@ Add the namespace for ` element in `Shared/NavMenu.razor` for the `CultureExample2` component:
-
-```razor
-
-```
+Optionally, add a menu item to the navigation in `Shared/NavMenu.razor` for the `CultureExample2` component.
## Additional resources
@@ -1040,15 +1029,7 @@ The following `CultureExample1` component can be used to demonstrate Blazor glob
The number string format (`N2`) in the preceding example (`.ToString("N2")`) is a [standard .NET numeric format specifier](/dotnet/standard/base-types/standard-numeric-format-strings#numeric-format-specifier-n). The `N2` format is supported for all numeric types, includes a group separator, and renders up to two decimal places.
-Add a list item to the navigation menu `
- ` element in `Shared/NavMenu.razor` for the `CultureExample1` component:
-
-```razor
-
- ` element in `Shared/NavMenu.razor` for the `CultureExample1` component:
-
-```razor
-