Last post Dec 08, 2005 11:05 AM by wcaterino
Dec 07, 2005 03:57 PM|wcaterino|LINK
I want to localize the page titles in my module. How do you use LocalizeControlTitle? I tried putting it in the page load event like this:
Localization.LocalizeControlTitle("ControlTitle", LocalResourceFile, "Edit")
with this data in my resource file:
And got the following error:
DotNetNuke.Services.Exceptions.ModuleLoadException: Length cannot be less than zero. Parameter name: length ---> System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length
at System.String.Substring(Int32 startIndex, Int32 length) at DotNetNuke.Services.Localization.Localization.LocalizeControlTitle(String ControlTitle, String ControlSrc, String Key) in C:\Inetpub\wwwroot\dnn320\components\Localization\Localization.vb:line 1193
at MY_MODULE.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\dnn320\DesktopModules\MY_MODULE_DIR\MY_MODULE.ascx.vb:line 33 --- End of inner exception stack trace ---
Thanks for the help!
Dec 08, 2005 05:28 AM|leupold|LINK
Dec 08, 2005 11:05 AM|wcaterino|LINK
Sorry, I seem to be missing the concept. Using LocalizeControlTitle like I did above:
Where ControlTitle = "ControlTitle", ControlSrc = LocalResourceFile, and
Key = "Edit"
I changed the entry in my resource file to add the Key as you stated like so:
I still get the error. Am I calling it from the correct place (PageLoad event)?