PC Review


Reply
Thread Tools Rate Thread

Dreamweaver using .resource files

 
 
Daniel
Guest
Posts: n/a
 
      29th May 2007
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?

 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      30th May 2007
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.

--
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!
************************************************
"Daniel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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?
>



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      11th Jun 2007
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!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Frontpage files to website created in Dreamweaver =?Utf-8?B?Qmlhbm5h?= Microsoft Frontpage 1 24th May 2006 07:18 PM
Recreate Dreamweaver website in Frontpage without source files?? =?Utf-8?B?U3RldmUgU2NvdHQ=?= Microsoft Frontpage 7 9th Mar 2006 05:40 PM
viewing hebrew access files in dreamweaver etc. =?Utf-8?B?bWVuYQ==?= Microsoft Access External Data 1 8th Dec 2004 06:48 AM
Scan Assembly for Resource Files + Scan Resource File for Keys JezB Microsoft C# .NET 0 21st May 2004 05:29 PM
.mno files generated by Dreamweaver MX J. Muenchbourg Microsoft Dot NET 0 13th Feb 2004 09:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:24 AM.