Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Dreamweaver using .resource files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 29 May 2007 21:10 GMT
I am just investigating on .resx and .resource files using asp.net.  I
am attempting to develop a webpage in Dreamweaver on an asp.net
webserver.  As i read around the net, using a .resource file for all
my text on my website seems like the best way to go.  I would just
have a fr.resource file for each language.  This seems like it would
work pretty well.  I have been able to create the .resource files but
i do not know how to read them to put on my website.  Most of the
information i have been reading explains how to do this with VBstudio,
but i am using dreamworks.  Can someone point me in the right
direction?
Cowboy (Gregory A. Beamer) - 30 May 2007 15:07 GMT
If this is page by page, you do the following:

1. Create a directory called App_LocalResources
2. Name the resource file for default.aspx default.aspx.resx
3. Use the following tag to get the value Header from this file (assuming a
name of HeaderText)

<%$ Resources:HeaderText %>

as in

<h1><asp:Label runat="server" Text="<%$ Resources:HeaderText %>"
id="Label3"/></h1>

For global resources

1. Create a directory called App_GlobalResources
2. Name the file something like GlobalResources.resx (name not as important
as matching the file name to the class name in the next step)
3. Use the following tag (note the GlobalResources class name as this is the
major change from local resources)

<%$ Resources:GlobalResources, HeaderText %>

as in

<h1><asp:Label runat="server" Text="<%$ Resources:GlobalResources,
HeaderText %>" id="Label3"/></h1>

Rule: ClassName = RESX file name.

If you do this, ASP.NET can be set up to automatically localize content when
you have the proper language resource files. You will have to add a
globalization tag to the web.config.

For a great intro, find Michele Leroux Bustamante's articles on MSDN. You
can also find her blog at www.dasblonde.com.

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************

>I am just investigating on .resx and .resource files using asp.net.  I
> am attempting to develop a webpage in Dreamweaver on an asp.net
[quoted text clipped - 6 lines]
> but i am using dreamworks.  Can someone point me in the right
> direction?
Daniel - 11 Jun 2007 17:52 GMT
That didn't work for me.  My site just displayed "<%$
Resources:GlobalResources,
HeaderText %>" in <h1> format.  My asp server compiles other code.  Do
you know what the problem could be?
thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.