© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
alkasel#159

✅ .NET Localization Culture Fallback

Hi, I'm using .NET localization in a blazor wasm hosted app, and I have the following issue:

Let's consider the generic class myclass, for which I have the following files:

myclass.razor
myclass.razor.cs
myclass.en.resx (english translations)
myclass.it.resx (italian translations)

Now, if I access the web app by means of a browser with culture set to "en", the english translations are displayed correctly. In fact, from developer tools I can see the request
http://.../_framework/en/Client.resources.dll, which is answered with a 200 OK containing some data as response.

If then I set the browser culture to "en-US", no term is translated. In fact I see browser is making the following requests:
http://.../_framework/en-US/Client.resources.dll
http://.../_framework/en/Client.resources.dll
Both of which are answerede with a 304 Not Modified.

I've tested on Firefox and Edge: the behavior is the same.

This is strange because the documentation describes a "Culture fallback" mechanism that should make the above scenario work.

Any idea what I could be doing wrong?

Thanks
Localization - .NET
Learn the concepts of localization while learning how to use the IStringLocalizer and IStringLocalizerFactory implementations in your .NET workloads.
Localization - .NET
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Culture.invariant
C#CC# / help
3mo ago
I'm crashing out at .NET MAUI Localization
C#CC# / help
4mo ago
Asp.Net Core Localization Resource File Naming Scheme
C#CC# / help
4y ago
Dynamic Culture WPF
C#CC# / help
17mo ago