Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Localization in Classes

Reply
 
Old 05-28-2008   #1 (permalink)
Pieter


 
 

Localization in Classes

Hi,

I'm using VB.NET with VS.NET 2005. I'm using the standard localization to
localize my Forms and UserControls, which works perfect.

BUT: I also want to localize the (error)messages I'm using in my CLASSES.
But there isn't a .resx file created for my classes. Is there any way to
generate somewhere such a set of files to be able to handle easily
localization inside classes? Or what is the best practice to do this?


Thanks a lot in advance,


Pieter



My System SpecsSystem Spec
Old 05-28-2008   #2 (permalink)
Cor Ligthert [MVP]


 
 

Re: Localization in Classes

Pieter,

Jay has once something written about this, most people like Nick P. (and me)
find this a hell of a job, but I can imagen that it is for Belgie probably
something to use.

http://groups.google.nl/group/micros...6d94884edf0e88

(Jay B. Harlow has in my idea written the most about this in this newsgroup)

Cor

"Pieter" <pieterNOSPAMcoucke@xxxxxx> schreef in bericht
news:exFuyTKwIHA.3968@xxxxxx
Quote:

> Hi,
>
> I'm using VB.NET with VS.NET 2005. I'm using the standard localization to
> localize my Forms and UserControls, which works perfect.
>
> BUT: I also want to localize the (error)messages I'm using in my CLASSES.
> But there isn't a .resx file created for my classes. Is there any way to
> generate somewhere such a set of files to be able to handle easily
> localization inside classes? Or what is the best practice to do this?
>
>
> Thanks a lot in advance,
>
>
> Pieter
>

My System SpecsSystem Spec
Old 05-28-2008   #3 (permalink)
Fred


 
 

Re: Localization in Classes

Dans : news:exFuyTKwIHA.3968@xxxxxx,
Pieter disait :
Quote:

> Hi,
>
> I'm using VB.NET with VS.NET 2005. I'm using the standard
> localization to localize my Forms and UserControls, which works
> perfect.
> BUT: I also want to localize the (error)messages I'm using in my
> CLASSES. But there isn't a .resx file created for my classes. Is
> there any way to generate somewhere such a set of files to be able to
> handle easily localization inside classes? Or what is the best
> practice to do this?
Try this.
Add a resource file to your project and give it the name of the file
containing your class (keeping the extension .resx).
Then VS will attach it to the class file and generate a designer file to
access the resources.
You can add several resource files, with the culture name before the
extension.

ex : MyClass.vb
Add MyClass.resx -> MyClass.designer.vb
Add MyClass.fr-BE.resx

You access the resources with My.Resources.MyClass.ResourceName


--
Fred
foleide@xxxxxx

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Localization of custom DLLs. .NET General
Localization: MUI or LIPS? Vista installation & setup
localization Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

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