ASP.NET Core Localization is the set of abstractions and implementations that allow developers to adapt their ASP.NET Core applications to a particular language, culture, and desired local "look and feel".
Questions tagged [asp.net-core-localization]
130 questions
49
votes
3 answers
ASP.NET Core Localization with help of SharedResources
Hi I have a question about the SharedResources file. It is glanced over in the tutorial here: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization, and I'm not sure if I get it correctly.
I am supposed to create a…
![](../../users/profiles/1796426.webp)
Daniel Aaron Salwerowicz
- 1,713
- 2
- 11
- 16
31
votes
2 answers
ASP.NET Core Model Binding Error Messages Localization
I'm using ASP.NET Core, and trying to localize the application. I managed to use new asp .net core resources to localize controllers and views, and old resources to localize error messages for model validation.
However, when the error message is…
![](../../users/profiles/4215091.webp)
Marko
- 1,108
- 3
- 17
- 33
15
votes
8 answers
ASP.Net Core localization
ASP.Net core features new support for localization.
In my project I need only one language. For most of the text and annotations I can specify things in my language, but for text coming from ASP.Net Core itself the language is…
![](../../users/profiles/313088.webp)
Tedd Hansen
- 11,020
- 14
- 57
- 93
14
votes
3 answers
How to Localize validation message (DataAnnotationsValidator) in blazor server side
I am using blazor 3.1 in latest version of VS 2019.
So far, I am able to localize page labels (title, table fields etc.).
On the ListEmployee.razor page, I am able to localize table heading etc. On the AddEmplyeeValidation.razor page, I am able to…
![](../../users/profiles/1122748.webp)
Learning
- 17,618
- 35
- 153
- 314
14
votes
2 answers
How to convert C# Resource File Strings into methods and not just properties?
Example, the EntityFramework Microsoft.EntityFrameworkCore.Relational project has the following text in the resource files:
...
The required column '{column}' was not present in the…
![](../../users/profiles/621366.webp)
peter
- 11,751
- 6
- 52
- 89
14
votes
1 answer
Understanding Resource files in MVC6 RC1
I've been trying to wrap my head around on how best to implement resource files for multiple languages in MVC6 but due to the changes with every release has me a bit confused on how to actually implement them properly. What is required and what are…
![](../../users/profiles/2109392.webp)
Reosoul
- 197
- 8
13
votes
5 answers
ASP.NET Core DisplayAttribute Localization
According to the documentation:
The runtime doesn’t look up localized strings for non-validation attributes. In the code above, “Email” (from [Display(Name = "Email")]) will not be localized.
I'm looking for a way to localize text in…
![](../../users/profiles/396502.webp)
David
- 400
- 2
- 4
- 17
10
votes
3 answers
How to get resource strings in strongly typed way in asp.net core?
In the following program, in order to get resource strings i am using _localizer["About Title"] where "About Title" is a magic string. How to avoid using strings like this? Is there any strongly typed way?
using Microsoft.AspNetCore.Mvc;
using…
![](../../users/profiles/2691812.webp)
Vikram Babu Nagineni
- 2,953
- 3
- 21
- 32
8
votes
1 answer
How to setup a fallback resource file for Views
Using IViewLocalizer I would like to implement view localization with a default or fallback resource file for words and phrases that appear on multiple pages like for example edit, add, delete... I don't want to add these repetitive phrases in the…
![](../../users/profiles/5584880.webp)
Biserka Zinreich
- 209
- 1
- 10
7
votes
3 answers
ASP .NET Core 1.0 RTM Localization not working
I've been trying to implement localization for my asp .NET Core 1.0 RTM web app following microsofts documentation and I just can not get it to work. The problem I'm having is that it's always displaying strings from the english resource file no…
![](../../users/profiles/5584880.webp)
Biserka Zinreich
- 209
- 1
- 10
7
votes
3 answers
Localization in separate project Asp.net Core MVC
I just upgraded to Rc2 and what used to work no longer does. I have a couple of resx files in a separate project and I use a custom class to access the data. Now I get the following error when running it:
MissingManifestResourceException: Could not…
![](../../users/profiles/4594483.webp)
mrfleck
- 311
- 2
- 9
6
votes
1 answer
Get ASP.NET Core model errors in a specific language other than english
I use DataAnnotation for validating models in ASP.NET Core. But when I have a required field, I got the error message in english when its missing like in this example:
class MyModel {
[Required]
[Display(Name = "Seitentitel")]
public…
![](../../users/profiles/3276634.webp)
Lion
- 11,498
- 13
- 55
- 113
5
votes
1 answer
How to localize the error message if unauthorized
It's an asp.net core webapi project, and I simply put the [Authorize] attribute to protect those apis. If user is not authorized, the api will return "401 unauthorized".
My question is how can I localize the "401 unauthorized" message if…
![](../../users/profiles/6294524.webp)
Charlie
- 1,520
- 1
- 12
- 25
5
votes
2 answers
How to use localization in Razor Class Library in Asp.Net Core
I have tried to create the Razor Class Library with Asp.Net Core in following project structure:
I have used in my web application these settings for localization in Startup class:
…
![](../../users/profiles/943403.webp)
Jenan
- 2,956
- 10
- 52
- 99
5
votes
2 answers
ASP.NET Core IViewLocalizer Not pulling my dictionary look-up values
Super frustrated with this one because I can get it working on a "Hello World" application but not my real application. Here's how I'm configured:
ConfigureServices:
services.AddLocalization(options => options.ResourcesPath =…
![](../../users/profiles/1216571.webp)
smurtagh
- 490
- 4
- 16