Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 8dce39d

Browse files
committed
Aggiunta documentazione MULTI LANGUAGE
1 parent 4021569 commit 8dce39d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Multi Language configuration
2+
3+
4+
## Registering services at Startup
5+
6+
```csharp
7+
public Startup(IConfiguration configuration)
8+
{
9+
Configuration = configuration;
10+
}
11+
12+
public IConfiguration Configuration { get; }
13+
14+
public void ConfigureServices(IServiceCollection services)
15+
{
16+
var supportedCultures = new[] { "en", "it" };
17+
services.AddSupportedCultures(supportedCultures);
18+
}
19+
20+
//OMISSIS
21+
22+
public void Configure(WebApplication app)
23+
{
24+
app.UseLocalizationConfiguration();
25+
}
26+
```
27+
28+
<b>Note:</b> The supportedCultures values can be changed to suit your needs.
29+
30+
But remember to create the resx files of the supported languages in the resources folder, setting the access modifier to Public.

0 commit comments

Comments
 (0)