From eb128adab4dd0727a3cc35e8ad7c7dede5935597 Mon Sep 17 00:00:00 2001 From: Daniel Vicarel Date: Wed, 4 Oct 2017 13:56:16 -0400 Subject: [PATCH] Clarified some language in the Globalization and Localization article --- aspnetcore/fundamentals/localization.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/fundamentals/localization.md b/aspnetcore/fundamentals/localization.md index 1928037649..8a9ff23483 100644 --- a/aspnetcore/fundamentals/localization.md +++ b/aspnetcore/fundamentals/localization.md @@ -39,7 +39,7 @@ targeted for localization and not need to create resource files early in develop In the code above, the `IStringLocalizer` implementation comes from [Dependency Injection](dependency-injection.md). If the localized value of "About Title" is not found, then the indexer key is returned, that is, the string "About Title". You can leave the default language literal strings in the app and wrap them in the localizer, so that you can focus on developing the app. You develop your app with your default language and prepare it for the localization step without first creating a default resource file. Alternatively, you can use the traditional approach and provide a key to retrieve the default language string. For many developers the new workflow of not having a default language *.resx* file and simply wrapping the string literals can reduce the overhead of localizing an app. Other developers will prefer the traditional work flow as it can make it easier to work with longer string literals and make it easier to update localized strings. -Use the `IHtmlLocalizer` implementation for resources that contain HTML. `IHtmlLocalizer` HTML encodes arguments that are formatted in the resource string, but not the resource string. In the sample highlighted below, only the value of `name` parameter is HTML encoded. +Use the `IHtmlLocalizer` implementation for resources that contain HTML. `IHtmlLocalizer` HTML encodes arguments that are formatted in the resource string, but does not HTML encode the resource string itself. In the sample highlighted below, only the value of `name` parameter is HTML encoded. [!code-csharp[Main](../fundamentals/localization/sample/Localization/Controllers/BookController.cs?highlight=3,5,20&start=1&end=24)] @@ -320,4 +320,4 @@ Terms: * [Localization.StarterWeb project](https://github.com/aspnet/entropy) used in the article. * [Resource Files in Visual Studio](https://docs.microsoft.com/cpp/windows/resource-files-visual-studio) -* [Resources in .resx Files](https://docs.microsoft.com/dotnet/framework/resources/working-with-resx-files-programmatically) \ No newline at end of file +* [Resources in .resx Files](https://docs.microsoft.com/dotnet/framework/resources/working-with-resx-files-programmatically)