This section is all about languages, culture, etc.
-
Shows the most basic use of localization using a resource file. This sample only supports French language (because we are fancy). It needs the following dependency
"Microsoft.AspNetCore.Localization": "2.1.0"
and"Microsoft.Extensions.Localization": "2.1.0"
. -
We build upon the previous sample and demonstrate how to switch request culture via query string using the built in
QueryStringRequestCultureProvider
. This sample supports English and French. -
Demonstrate the difference between
Culture
andUI Culture
. -
Demonstrate how to switch request culture via cookie using the built in
CookieRequestCultureProvider
. This sample supports English and French. -
Demonstrate using Portable Object (PO) files to support localization instead of the cumbersome resx file. This sample requires
OrchardCore.Localization.Core
package. This sample requiresASPNET Core 2
. -
This is a continuation of previous sample but with context, which allows the same translation key to return different strings.