79689007

Date: 2025-07-03 14:31:51
Score: 4
Natty: 6
Report link

Hello, I’m working on localizing my custom DNN module (C#, ASP.NET).

šŸ‘‰ I’m following the standard approach:

<data name="msg" xml:space="preserve">
  <value>Congrats !!</value>
</data>

My code:

string resourceFile = this.TemplateSourceDirectory + "/App_LocalResources/View.ascx";

string message = Localization.GetString("msg", resourceFile);

lblMessage.Text = message ?? "Key not found";

or

lblMessage = Localization.GetString("msg", this.LocalResourceFile);

āœ… The resource files are in the right folder.
āœ… The key exists and matches exactly.
āœ… The file name matches (View.ascx.fr-FR.resx).

āŒ **But Localization.GetString always returns null.

What I checked:**

My question:
āž” Does anyone have a working example where Localization.GetString reads App_LocalResources successfully without modifying the web.config (i.e. without re-enabling buildProviders for .resx)?
āž” Could there be something else blocking DNN from loading the .resx files (for example, a hidden configuration or DNN version issue)?

Thanks for your help!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Whitelisted phrase (-0.5): Thanks for your help
  • RegEx Blacklisted phrase (3): Does anyone have a working
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Test Test