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  |  

Maximum ASP
  Ads  
 


  Sponsors  

Meet Our Sponsors

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


DotNetNuke Forums
 
  Forum  General DotNetN...  Localize It! (L...  Localize Code Behind and Gridview Headers with Xepient's Open-Smart Module
Previous Previous
 
Next Next
New Post 10/8/2008 9:07 AM
Informative
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Localize Code Behind and Gridview Headers with Xepient's Open-Smart Module  
Modified By b471code3  on 10/8/2008 11:10:31 AM)

After much work on this with the Xepient Support Team I have come up with a solution to localize code behind messages and gridview headers utilizing the Open-Smart Module.  In order to do this you need to access the LocalResourceFile property in Open-Smart Module.  To do so just add a public property to your class like this:

 

Public Property LocalResourceFile() As String  
Get
Return TryCast(Me.Parent.Parent, DotNetNuke.Entities.Modules.PortalModuleBase).LocalResourceFile
End Get
Set(ByVal Value As String)
TryCast(Me.Parent.Parent, DotNetNuke.Entities.Modules.PortalModuleBase).LocalResourceFile = Value
End Set 
End Property

Then access it like this to change the code behind message:

lblMessage.Text = Localization.GetString("SelectAnswerForAllQuestions", Me.LocalResourceFile)

To localize the gridview headers call this method as the first line of the page load (make sure your HeaderText is the same as the entry in the resource file)

DotNetNuke.Services.Localization.Localization.LocalizeGridView(gvEquipList, Me.LocalResourceFile)

Hope this helps others as is has me!

 

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Localize It! (L...  Localize Code Behind and Gridview Headers with Xepient's Open-Smart Module
 


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.

 


DNNSpired.com
Inspired to extend DotNetNuke®, everyday.
www.DNNSpired.com
TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk

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