Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Language Packs ...  LocalResourceFile - broken?
Previous Previous
 
Next Next
New Post 9/28/2006 6:12 AM
User is offline Brian Sammons
18 posts
10th Ranked


LocalResourceFile - broken? 

Have posted about this before and don't seem to be getting anywhere.  These forums are like a ghost town anymore <tumbleweed rolls by>

Trying to Localize a gridview's headers.  Thinking it was my install that was messed up (because search is not working either), I Installed a new instance of 4.3.5 from the source download and created new Database.

I have narrowed it down to the fact that Me.LocalResourceFile returns no file instance when the user is not logged in.  So then it goes to the DNN resourcefile looking for the entries.  I am perfectly willing to accept that I may not understand the way this works, but it sure doesn't seem like it's working right to me.

 

If Me.UserId = -1 Then
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile & "\viewEmployees.ascx.resx")
Else
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile)
End If

 

Thanks

 
New Post 10/11/2006 8:11 PM
User is offline Paul Massardo
1 posts
10th Ranked


Re: LocalResourceFile - broken? 

Hi BJSammons,

I have the same issue when I'm logged in as a host or admin it works fine but if i'm not logged in or I'm logged in as a basic user then I have the same problem it doesn't load the View*.ascx.resx file.

The problem with the following code is that it is a work around for user who are not registered if they are registered and logged in it could be user id 3 to what ever.

If Me.UserId = -1 Then
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile & "\viewEmployees.ascx.resx")
Else
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile)
End If

1 is host and 2 is admin which in my case both work so 

If Me.UserId = 1 or Me.UserId = 2  Then
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile)
Else
   c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile    & "\viewEmployees.ascx.resx")
End If

The ideal fix would be cracking the code and fixing it but I'm working in VS2005 Express and it is tough to do anything in that.

Paul

 

 

 

 
New Post 10/12/2006 7:14 AM
User is offline Brian Sammons
18 posts
10th Ranked


Re: LocalResourceFile - broken? 

Upon further investigation it actually appears that the issue is whethor or not the current user has edit permissions for the module.  This code seems to working, regardless of who is logged in (admin or otherwise).

If IsEditable() = False Then

c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile & "\viewEmployees.ascx.resx")

Else

c.HeaderText = Localization.GetString("lbl" & c.HeaderText & ".Text", Me.LocalResourceFile)

End If

 
New Post 1/30/2007 6:50 AM
User is offline Àlex Peláez
3 posts
experienciasnet.blogspot.com/
10th Ranked


Re: LocalResourceFile - broken? 

Well,
I had the same issue and I found the solution in an other thread. I dont't know why but to solve it you have to disable the cache for the module definition and for each module instance that you use (Set the value to 0).

 

 
New Post 1/30/2007 8:15 AM
User is offline William Severance
740 posts
www.wesnetdesigns.com
7th Ranked






Re: LocalResourceFile - broken? 
Modified By William Severance  on 1/30/2007 12:15:54 PM)

That's quite odd as I've seen no such problem with localization in 4.3.7 or 4.4.0. Simply passing Me.LocalResourceFile to Localization.GetString appears to work regardless of whether the user is logged in or not or if he/she has edit privileges on the module control (assuming the ControlType in the ModuleDefinitions is "View", that is).

You might also be interested in this GridView localization method that I contributed a while back:

www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/80/threadid/94341/scope/posts/Default.aspx

For the ResourceFile parameter, I simply pass in Me.LocalResourceFile.


Bill, WESNet Designs
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Language Packs ...  LocalResourceFile - broken?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Willhite & Sharron Realtors
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP