Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Doubt on Multilingual application

Reply
Thread Tools

Doubt on Multilingual application

 
 
amitmnagarwal@gmail.com
Guest
Posts: n/a
 
      10-12-2006
I am using the following code to access the resourc file.

Dim sAssembly As [Assembly]
sAssembly = [Assembly].GetExecutingAssembly()

Dim rm As New ResourceManager("MultiLingual.Info",
sAssembly)

''Case sensitive
Response.Write(rm.GetString("Test"))
Response.Write("<br><br>" & rm.GetString("Test1"))

This code would reside in a common place where the whole application
would require the info from the resource file.

I wanted to know that if i create the instance of the resourcemanager
at application level in the application start event and let the code
reference the application object.

This would avoid callling the above code repeatedly

Please advice

 
Reply With Quote
 
 
 
 
Chris Fulstow
Guest
Posts: n/a
 
      10-12-2006
Probably not a good idea because more than one thread might try to use
you ResourceManager object at the same time, so you could run into
concurrency problems.

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I am using the following code to access the resourc file.
>
> Dim sAssembly As [Assembly]
> sAssembly = [Assembly].GetExecutingAssembly()
>
> Dim rm As New ResourceManager("MultiLingual.Info",
> sAssembly)
>
> ''Case sensitive
> Response.Write(rm.GetString("Test"))
> Response.Write("<br><br>" & rm.GetString("Test1"))
>
> This code would reside in a common place where the whole application
> would require the info from the resource file.
>
> I wanted to know that if i create the instance of the resourcemanager
> at application level in the application start event and let the code
> reference the application object.
>
> This would avoid callling the above code repeatedly
>
> Please advice


 
Reply With Quote
 
 
 
 
Robert Haken [MVP]
Guest
Posts: n/a
 
      10-12-2006
When localizing ASP.NET web applications, you should use

<%$ Resources: .... %> expressions in markup,
Resources (generated namespace),
HttpContext.GetGlobalResourceObject() method (available also in Page)
and HttpContext.GetLocalResourceObject() method (available also in Page).

There is usually no need to use ResourceManager.

Robert Haken [MVP ASP/ASP.NET]
HAVIT, s.r.o., www.havit.cz
http://knowledge-base.havit.cz

<(E-Mail Removed)> píse v diskusním príspevku
news:(E-Mail Removed) ups.com...
>I am using the following code to access the resourc file.
>
> Dim sAssembly As [Assembly]
> sAssembly = [Assembly].GetExecutingAssembly()
>
> Dim rm As New ResourceManager("MultiLingual.Info",
> sAssembly)
>
> ''Case sensitive
> Response.Write(rm.GetString("Test"))
> Response.Write("<br><br>" & rm.GetString("Test1"))
>
> This code would reside in a common place where the whole application
> would require the info from the resource file.
>
> I wanted to know that if i create the instance of the resourcemanager
> at application level in the application start event and let the code
> reference the application object.
>
> This would avoid callling the above code repeatedly
>
> Please advice
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
How to create Asp.Net Application with Multilingual storage with Multibackend bsm ASP .Net 2 04-24-2007 11:04 AM
multilingual application in C++ Imran C++ 1 08-29-2006 10:08 AM
2005/06/21 Lectra.Kaledo.Style.V1R1C11.Multilingual, 2005/06/21 Lectra.Diamino.Fashion.V5R2.Multilingual, new ! vvcd NZ Computing 0 06-24-2005 02:17 AM
Is MS-Windows 2000 Server multilingual version needed for the deployment of multilingual website? JoanneC ASP .Net 0 08-30-2003 03:45 PM
MS-Windows 2000 Server multilingual version needed to deploy multilingual website? JoanneC ASP .Net 0 08-28-2003 11:26 AM



Advertisments