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  |  

DotNetNuke Marketplace
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Localize It! (L...  Is Localiztion codes on ASP.NET Compatible to DNN?
Previous Previous
 
Next Next
New Post 7/29/2008 12:23 AM
Resolved
User is offline aliasncnu
118 posts
9th Ranked


Is Localiztion codes on ASP.NET Compatible to DNN? 

For example, does the following syntax still work on DNN?

<asp:Label ID="lblRows" runat="server" Text="<%$ Resources:lblRows.Text %>" ></asp:Label>

More importantly, does the above will reach appropriate resource file in App_LocalResources according to the selected lanague via DNN?

Thanks a lot.

Ricky.

 
New Post 7/29/2008 8:45 AM
User is offline Ian Robinson
639 posts
www.engagesoftware.com
7th Ranked


Re: Is Localiztion codes on ASP.NET Compatible to DNN? 

aliasncnu,

You'll want to use the following syntax:

<asp:Label runat="server" ResourceKey="RowsLabel" />

If you are in a control called "Text.ascx" - this will look in (relatively) App_LocalResources\Text.ascx.resx" for a key "RowsLabel.Text" and return the appropriate value.

This (behind the scenes) uses the LocalResourceFile property from portal module base to dynamically create the appropriate relative URL for a given control.

That should be a good start - let us know if you have any other questions.

Take care,

Ian

 


Ian Robinson
Engage Software
St. Louis, MO
314.966.4000



The leading provider of DotNetNuke support, training and custom development.
 
New Post 7/29/2008 6:36 PM
User is offline aliasncnu
118 posts
9th Ranked


Re: Is Localiztion codes on ASP.NET Compatible to DNN? 

 Ian Robinson wrote

aliasncnu,

You'll want to use the following syntax:

If you are in a control called "Text.ascx" - this will look in (relatively) App_LocalResources\Text.ascx.resx" for a key "RowsLabel.Text" and return the appropriate value.

This (behind the scenes) uses the LocalResourceFile property from portal module base to dynamically create the appropriate relative URL for a given control.

Hello Lan,

Appreciate much for your reply.

Actually, I have had a UserControl, UC that is localized with ASP.NET bulit-in manner (as in original post), and would like to transfer it to DNN. Is there any knack that is compatibile to both ASP.NET and DNN localization mechanism?

Thanks,

Ricky.

 
New Post 7/29/2008 9:45 PM
Accepted Answer 
User is offline Brandon Haynes
694 posts
everysport.net
7th Ranked


Re: Is Localiztion codes on ASP.NET Compatible to DNN? 

Hi Ian,

I ran into a similar issue awhile back, and was forced to adapt DNN to allow use of ASP.NET localization (DNN had its own powerful localization library long before ASP.NET 2.0).  I discuss the changes necessary to utilize both methods side-by-side here: http://brandonhaynes.org/GamePlan3/Home/tabid/489/EntryID/4/Default.aspx.  Unfortunately, at this time it still requires one small core change (and the resultant recompile).  I believe the work item that would alleviate this core change is still open, so there remains some small hope that in the future this method would be possible without any core modifications.

Hope this helps!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post 8/16/2008 2:46 PM
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Re: Is Localiztion codes on ASP.NET Compatible to DNN? 
Modified By b471code3  on 8/16/2008 4:49:50 PM)

First of all, aliasncnu sorry for the hijack of your post but I wasn't able to find an email for Brandon and figured this would be a great edition to this post.

Brandon - great post!  Got a few questions:  I am building custom controls (.ascx files) within my own ASP.NET 3.5 web project, compiling the project, adding the .dlls to the BIN directory and adding the ascx control to my DNN site via Xepient Solutions Open-Smart Module and all is well!  The problem is I am not able to localize any of the text although I have an App_LocalResources directory in my local project and the needed resourceKey:Label1.Text.  Is there something else I have to do in order to get this to work properly?  My controls are in the Portals\0 directory of my DNN site and I have tried to put my App_LocalResources directory in there as well as other places and still nothing.  Any suggestions?

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Localize It! (L...  Is Localiztion codes on ASP.NET Compatible to DNN?
 


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.

 


Need Help with your DotNetNuke website?
Jango Studios offers exclusive DotNetNuke Skin Design, Module Development, Web Marketing and Web Hosting.
www.jangostudios.net
Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca

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