Visio add-in localiztion

B

BBD

Hi all,

Is there any good link for Visio add-in localization? I have created my
Visio add-in MyTest project using Visual Studio 2005 project template "New
Project / Visual C# / Office / 2007 Add-ins / Visio Add-in". This template
generated (among others) files Resources.resx and ThisAddIn.cs. MyTest
application setup project was created by this template too.

My problem is: after I have created new resource file Resources.fr-FR.resx
and included it into my add-in project , I observe following things:
-- when I start Visio within my Visual Studo 2005 environment, English or
French strings correctly appear in MyTest add-in dialogs, shapes strings
etc, dependently on Regional Settings in Control Panel (Windows XP).
-- if I install my add-in as an independent software package with Setup
application, generated by MyTestSetup project, then Visio does not show
localized strings (only English), no matter what I do in my code.

To localize my add-in I use following statement in the add-in Startup method
code:

Resources.Culture = System.Globalization.CultureInfo.CurrentCulture;

Do I do something wrong? What is a "best practice" to localize Visio add-in?
Any help or links about that would be greately appreciated...

Thanks,
BBD
 
N

Nikolay Belyh

Hello BBD,

Maybe you forgot to add localized resources to your setup?
SetupProject => Add => Project Output => Localized resources.

Kind regards, Nikolay
 
B

BBD

Thank you, Nikolay
Maybe you forgot to add localized resources to your setup?
SetupProject => Add => Project Output => Localized resources.


No, MyTestSetup setup already contains "Localized resources from MyTest
(Active)".

BBD
 
N

Nikolay Belyh

Thank you, Nikolay


No, MyTestSetup setup already contains "Localized resources from MyTest
(Active)".

Then it should work I suppose (at least it works for me)..
AFAIK this localization stuff is unrelated to Visio. So if there is
localized resource dll then it should be used...
Maybe you should check wich files are actually installed to
ProgramFiles\MyTest by setup?
Are you completely sure that the localized dlls are there?

Kind regards, Nikolay.
 
B

BBD

Thank you again,
Then it should work I suppose (at least it works for me)..
AFAIK this localization stuff is unrelated to Visio. So if there is
localized resource dll then it should be used...
Maybe you should check wich files are actually installed to
ProgramFiles\MyTest by setup?
Are you completely sure that the localized dlls are there?

C:\Program Files\MyTest directory contains following files:

MyTest.dll,
MyTest.dll.manifest
\fr-FR\MyTest.resources.dll
\nb-NO\MyTest.resources.dll

There are more files in the installation directory, like SetSecurity.dll or
Microsoft.Office.Interop.Visio.dll, but they have no relation with
localization, I think.

My Visuo Studio 2005 project directory has the same collection of
localization files:

D:\Projects\MyTest\bin\Debug\MyTest.dll,
D:\Projects\MyTest\bin\Debug\MyTest.dll.manifest
D:\Projects\MyTest\bin\Debug\fr-FR\MyTest.resources.dll
D:\Projects\MyTest\bin\Debug\nb-NO\MyTest.resources.dll

and some other non-important ones, like *.pdb files. Strange thing is that
localization works perfectly when Visio is started from Visual Studio, but
does not work when MyTest add-in is installed and Visio is started as
standalone application.

BBD
 
N

Nikolay Belyh

MyTest.dll,
MyTest.dll.manifest
\fr-FR\MyTest.resources.dll
\nb-NO\MyTest.resources.dll

Sorry then, I can't be of any help here..
All I can say is that "when I do like that" it usually works... :)
Maybe there are some manifest issues? Try to remove the manifest file
and check if there are any changes..

Kind regards, Nikolay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top