Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksLocalResourceFile - broken?LocalResourceFile - broken?
Previous
 
Next
New Post
9/28/2006 9:12 AM
 

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 11:11 PM
 

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 10:14 AM
 

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 10:50 AM
 

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 12:15 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
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksLocalResourceFile - broken?LocalResourceFile - broken?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out