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

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...How to use resource file for gridview How to use resource file for gridview
Previous
 
Next
New Post
10/6/2008 4:45 PM
 

Your code is in lets say code.ascx.vb

You write the line for Grid1 as I wrote before. You have the names of the headers in code.ascx

NOw you put in the resourcefile code.ascx.resx for one header XXXXX (similar for other)

<data name="XXXXX.Header">
    <value>XXXXXX</value>
  </data>

Now you can translate XXXXX

 
New Post
10/6/2008 5:00 PM
 

In my code behind I have this in the page load: 

DotNetNuke.Services.Localization.Localization.LocalizeGridView(gvEquipList, "ResourceFile")

Here is what I have in the .ascx file:

<asp:

GridView ID="gvEquipList" runat="server" Width="100%" AutoGenerateColumns="False"
BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="0px"
CellPadding="4" ForeColor="Black" GridLines="Vertical" AllowSorting="True"
DataKeyNames="Tag" DataSourceID="objTagList" > 
 
<FooterStyle BackColor="#CCCC99" />
<RowStyle BackColor="#CCCCCC" />
<Columns>
<asp:HyperLinkField DataTextField="Tag" HeaderText="Tag" SortExpression="Tag"
NavigateUrl="~/Tasks/Equipment/Detail.aspx"
DataNavigateUrlformatString="~/Tasks/Equipment/Detail.aspx?tag={0}"
DataNavigateUrlFields="Tag" DataTextformatString="{0}" />

<asp:BoundField DataField="Mfg" HeaderText="Mfg" SortExpression="Mfg" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>

etc, etc, etc.

By rights this should work but what is the value of Me.LocalResourceFile?  I think this is where I am falling short?  By the way, wouldn't my .resx file be XXXXX.HeaderText vs. XXXXX.Header?

 

 

 


View Brenden Kehren's profile on LinkedIn
 
New Post
10/6/2008 5:19 PM
 

Me.LocalresorceFile will bee translated to you resourcefile that should be the same name as your ascx file.

XXXXXX.Header works I dont know if .Text do I doubt it.

I have not tryed your method of code behind. My works fine and its easy to copy to the next module

 
New Post
10/7/2008 9:02 AM
 

Still confused as to where Me.LocalResourceFile comes from.  Is this a property I have to add or is this a property I need to reference in a DNN dll?  When I add it in my code I get an error stating "LocalResourceFile is not a member of MyApp.EquipList" 


View Brenden Kehren's profile on LinkedIn
 
New Post
10/7/2008 10:04 AM
 

 Have you added ?

 

Imports

DotNetNuke.Services.Localization

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...How to use resource file for gridview How to use resource file for gridview


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