Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: internationalization problem

Reply
Thread Tools

Re: internationalization problem

 
 
Natty Gur
Guest
Posts: n/a
 
      12-23-2003
Hi,

I cant see your code but usually this error is caused by loading the
resource file with :

<code>
Assembly a = Assembly.Load(<WebApplicationName>);

ResourceManager rm = new ResourceManager(<WebApplicationName>, a);
<code>

if its your case try using this approach to create the resource manager:

ResourceManager resources = new ResourceManager(
"<WebProjectName>.<ResName>",
Assembly.GetExecutingAssembly(),
null );

..where the resx files are named:

<ResName>.<Culture>.resx

You may also want to consider creating a only a single instance of the
ResourceManager for your web app that is kept in a static class member
or
the Application object. This cause the resources to be loaded only once
per application.


Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Francois Malgreve
Guest
Posts: n/a
 
      12-23-2003
Hi Natty,

This is working pretty well. I owe you one!

Please note something tho:
I was already using something simlar as what u told me which is:
ResourceManager resources = new ResourceManager("baseName",
Assembly.GetExecutingAssembly(), null );

The only difference is that you showed me that baseName must be:
"<WebProjectName>.<ResName>"
And not just "<ResName>" as said in the MSDN documentation:

http://msdn.microsoft.com/library/de...ctorTopic4.asp

where MS says:
baseName
The root name of the resources. For example, the root name for the resource
file named "MyResource.en-US.resources" is "MyResource".

Basically there is a mistake in the reference or then there is just a basic
commonly understood thing that i am not aware of?

Thanks a lot

Francois


"Natty Gur" <> wrote in message
news:%...
> Hi,
>
> I cant see your code but usually this error is caused by loading the
> resource file with :
>
> <code>
> Assembly a = Assembly.Load(<WebApplicationName>);
>
> ResourceManager rm = new ResourceManager(<WebApplicationName>, a);
> <code>
>
> if its your case try using this approach to create the resource manager:
>
> ResourceManager resources = new ResourceManager(
> "<WebProjectName>.<ResName>",
> Assembly.GetExecutingAssembly(),
> null );
>
> .where the resx files are named:
>
> <ResName>.<Culture>.resx
>
> You may also want to consider creating a only a single instance of the
> ResourceManager for your web app that is kept in a static class member
> or
> the Application object. This cause the resources to be loaded only once
> per application.
>
>
> Natty Gur[MVP]
>
> blog : http://weblogs.asp.net/ngur
> Mobile: +972-(0)58-888377
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
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
JDBC internationalization/localization problem Unicode/UTF-8 Wolfgang Java 4 03-25-2009 12:07 PM
problem with sending json encoded data via ajax to a php script(internationalization) Pugi! Javascript 6 01-12-2008 06:46 AM
Internationalization problem horseface Java 5 01-20-2005 03:05 PM
internationalization problem continues. Francois Malgreve ASP .Net 0 12-29-2003 08:32 AM
Internationalization Problem Pablo Jose Almeida da Guia ASP .Net 0 12-05-2003 12:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57