Some problems with basic DotNetNuke localization methods

985 views Asked by At

I'm writing a simple DNN module - using DNN 5.6.1 and currently just working direct in a VB.Net source file within the DesktopModules subfolder of a DNN website.

To localize an error message within the module, I'm trying to use:

Dim baseString As String = Localization.GetString("CoveringErrorMessage", Me.LocalResourceFile)

However, this is currently returning "Nothing". Even though Me.LocalResourceFile seems to point to the correct path - /DesktopModules/MyModule/App_LocalResources/MyModule - where MyModule.ascx.resx resides, and even though "CoveringErrorMessage" is defined.

I've also checked that I can definitely edit the resx files from the Admin Language editor.

Beyond this, I've also got a problem with AddModuleMessage() not showing any message - so I'm wondering if there's some obvious setup step I've missed.

All ideas appreciated - this is just one of those frustrating things at present.

1

There are 1 answers

1
bdukes On BEST ANSWER

It'll look for CoveringErrorMessage.Text rather than just CoveringErrorMessage. Where there's not a . it adds .Test to the resource key.