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...ToolTips do not changeToolTips do not change
Previous
 
Next
New Post
10/30/2008 10:19 AM
 

I have a multi lingual portal (7 languages) and all my labels, images, etc change to the correct language when I select the appropriate flag although the tooltips, alt text and hover text for images do change.  Here is an example of my code:

 

<asp:Label ID="lblWorkerName" runat="server" Text="First name:" resourceKey="FirstName" ToolTip="First name"></asp:Label>asp:Image ID="imgTag1" runat="server" ImageUrl="~/images/img_not_avail_300X450.png" resourceKey="ProductImage" AlternateText="Product Image" ToolTip="Product Image" />

Here are the resources in my resource file:

English:
FirstName.Text = First name: 
FirstName.ToolTip = First name 
ProductImage.AlternateText = Product Image 
ProductImage.ToolTip = Product Image 

French:
FirstName.Text = Prénom: 
FirstName.ToolTip = Prénom 
ProductImage.AlternateText = Image du produit 
ProductImage.ToolTip = Image du produit 

Am I missing something?

<


View Brenden Kehren's profile on LinkedIn
 
New Post
10/30/2008 11:32 AM
 

Unfortunately, the resource key doesn't work quite like that.  You will have to fill the AlternateText and Tooltip properties manually.  If this is inside of a skin, the easiest way is to use databinding syntax. 

<asp:Label ID="lblWorkerName" runat="server" Text="First name:" resourceKey="FirstName" ToolTip='<%#Localization.GetString("FirstName.ToolTip")%>'/>
<asp:Image ID="imgTag1" runat="server" ImageUrl="~/images/img_not_avail_300X450.png" resourceKey="ProductImage" AlternateText="'<%#Localization.GetString("ProductImage.AlternateText")%>'" ToolTip="'<%#Localization.GetString("ProductImage.ToolTip")%>'" />

If this is in a module that you are building, it's probably easier to just set these properties from the code behind file.


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
10/31/2008 11:51 AM
 

Brian - thanks for the help.  It worked perfect.  Wonder why this doesn't work automatically?


View Brenden Kehren's profile on LinkedIn
 
New Post
11/1/2008 3:02 PM
 

Sorry for the premature approval.  I was looking at the wrong control when I answered.

I chose to not use the code behind method as it just didn't seem like the right option for the amound of labels, images, etc I have on the page.  So I chose to add them using the databinding syntax like this:

<

asp:Label ID="lblSite" runat="server" Text="Site:" resourceKey="Site" ToolTip='<%# Localization.GetString("Site.ToolTip") %>' ForeColor="White" Font-Bold="true"></asp:Label>

Problem is now they don't display at all.  I have the reference in my code behind to DotNetNuke.Services.Localization and added the imports statement to the .ascx file like this:

<%

@ Import Namespace="DotNetNuke.Services.Localization" %>

Still no success.  I have tried adding Localization.GetString("Site.ToolTip", Me.LocalResourceFile) to the control and still no success.  What else am I missing?


View Brenden Kehren's profile on LinkedIn
 
New Post
11/3/2008 10:09 AM
 

Is this a skin or a module?  If it's not a skin, you'll need to call Control.DataBind() sometime in order for those databinding statements to be evaluated.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...ToolTips do not changeToolTips do not change


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