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
0
votes
1 answer
How to localize error messages in data annotation in ASP.Net Boilerplate?
I'm using a project based on ASP.Net Boilerplate version 3.6.2 and ASP.Net Zero MVC (ASP.Net Core) template version 3.8.0. The method of localization is described in the official documentation, but how to localize error messages in data annotation…
XelaNimed
- 249
- 5
- 16
0
votes
1 answer
Is there a way to add two resource folders to aspnet core localization?
I'm currently developing the SDK for one project and as a requirement I need to add two resources locations. One will be provided with the SDK lib and another to be provided by the consumer app.
Currently, according to docs, this is how to add…
eestein
- 4,354
- 4
- 45
- 83
0
votes
4 answers
Localized string from resource file
I would like to add localized strings in my view.
Resources/Views.Account.Login.en-US.resx
Views/Account/Login.cshtml
@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer Localizer
…
user8664653
0
votes
0 answers
ASP.NET Core project returns wrong localization after being idle
My localization works fine but if the site is idle for about 15 minutes then the next page load always returns english. So I load a page and the language is correct, leave it for 15 mins and refresh and it is english. A second refresh or changing…
Valtteri
- 33
- 6
0
votes
1 answer
How to use a shared resource for localization in .net core 2 in controllers?
I'm new to .net core development after years of working in .net framework on mostly webform applications.
I'm trying to localize a new project and looking at options determined for this particular use that a shared resource would be the most…
David Elder
- 1
- 1
0
votes
1 answer
Location of UseRequestLocalization() call in Startup
I have a custom implementation of IRequestCultureProvider. This provider checks if the user is not logged in, then it sets the current culture, otherwise it does not set the culture. Other culture providers would set the current culture, if user is…
dudedev
- 341
- 3
- 16
0
votes
1 answer
String is not being translated in ASP.NET Core
On an ASP.NET Core 2.0 view I have the following:
@inject IViewLocalizer localizer;
@localizer["my message"]
This works and the string is translate.
Then on a class of the application I tried:
public class MyClass {
public…
Miguel Moura
- 28,129
- 59
- 187
- 356
0
votes
1 answer
Localize an ASP.NET Core MVC app
I'm struggling with getting my app to localize strings properly. Feel that I've searched every corner of the web without finding something that works that I expect it to.
I use the RouteDataRequestCultureProvider and first problem I'm trying to…
joacar
- 850
- 11
- 22
0
votes
0 answers
ASP.net Core Missing Copy xxxxx.resources.dll
I have a project named "Common". It contains resource.resx and resource.zh.resx resource files. And I created an ASP.net core project and referenced Common project. When I build the ASP.net core project I doesn't see Common.resource in output…
Eagle
- 391
- 1
- 4
- 13
0
votes
1 answer
Working with localization in ASP.NET Core 1.0 MVC
I am trying to implement localization in our application, but I just cannot get it to work. My problem is how can I set the culture properly and how can access the localization string as per the culture set.
I am trying to set the culture from…
XamDev
- 2,435
- 8
- 44
- 75