HighTechTalks DotNet Forums  

VSDesigner and Satelite Assemblies

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss VSDesigner and Satelite Assemblies in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ruben
 
Posts: n/a

Default VSDesigner and Satelite Assemblies - 10-27-2004 , 07:42 AM






All,

I'm working with the satelite assemblies for quite some time now but I never
have found the solution for getting it working in the Windows Designer.

What I've got is the following:
Foreach assembly in my project there's one "namespace" folder called
StringResources. In there i'm supporting 4 languages of string resouces
resp. English (Default), Dutch, Russian and Spanish.

In the forms and user controls there's a method with the Designer generated
code. Overthere i've added the following code lines:

To initiate the resource manager:
System.Resources.ResourceManager assemblyResources = new
System.Resources.ResourceManager("JewelSuite.Strin gResources.strings",
this.GetType().Assembly);

To retrieve the string resources:
this.copyrightsLabel.Text =
assemblyResources.GetString("joaJewelSuiteAbout.Ti tleLabel");

The moment you open the Windows Designer it throws this error:
The variable 'assemblyResources' is either undeclared or was never assigned.

When I startup the application everything seems to work fine.

To solve this problem I've used the following strategies:

- Changed the initialization of the ResourceManager to
System.Resources.ResourceManager("JewelSuite.Strin gResources.strings",
typeof(joaJewelSuiteAbout)) to make sure the designer does not need a live
instance of the about dialog.
- Used a second VS environment to attach the the first VS environment to
check which assemblies where loaded by the designer. Nothing worthwile was
noticed.
- Made a derived class of the ResourceManager where I checked for a
running instance of the application and otherwise I returned the argument
(Resource name) passed in.
- I've encapsulate the ResourceManager in a Component and added some
attributes to check if the designers throwed some strange exceptions.
(Nothing found)

Anyone any other ideas how to get the designer support the multiple
languages?



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.