Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / September 2006

Tip: Looking for answers? Try searching our database.

how to localize a ctc file with VS 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick Ruzand - 11 Sep 2006 15:29 GMT
Hello,

I have developed a VS2005 Package that includes a ctc file. This file
defines a new menu and some commands.
I now need to localize this ctc fil, but I have not found any
straightforward solutions. While browsing the web, I have found this post on
Allen Denver's blog:
http://blogs.msdn.com/allend/archive/2005/07/19/440641.aspx

Basically, it says it is done by hand by editing the .cto file. Is it still
the recommended way to do that or are there any built-in features in VS 2005
that allows to easily localize a ctc file ?

Thanks,
Patrick
Gary Chang[MSFT] - 12 Sep 2006 08:13 GMT
Hi Patrick,

This is a quick note to let you know that I am performing research on this
issue and will get back to you as soon as possible. I appreciate your
patience.

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 13 Sep 2006 08:21 GMT
Hi Patrick,

I have consulted this issue with our development team member, I am afraid
currently it still needs to edit the CTC file manually. There is a switch
on the CTC compiler (/L) that you can use to set the codepage.  In VS2003
and prior one had to actually run the compiler on the target OS, but with
this switch you now only need to set the right value to target the locale.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Patrick Ruzand - 13 Sep 2006 09:53 GMT
Hi Gary,

> Hi Patrick,
>
> I have consulted this issue with our development team member, I am afraid
> currently it still needs to edit the CTC file manually.
> There is a switch
> on the CTC compiler (/L) that you can use to set the codepage.

Just to be sure I understand correctly. I need to 1/ copy the original
ctc file (let's say the english one); 2/ localize the copy ; 3/ compile
it using the ctc compiler, specifying the codepage of the localized file.
Is that correct ?

So once I have compiled the localized ctc file, how should I process to
package the localized file into my package ? should I create a satellite
dll for my locale ? Can this be done from the IDE ?

Thanks for your help,

Patrick
Gary Chang[MSFT] - 15 Sep 2006 08:06 GMT
Hi Patrick,

Your understanding is correct::

1. Copy the original .ctc file;
2. Localize the copy;
3. Compile it using the ctc compiler, specifying the codepage of the
localized file.

Then create a satellite dll and add a that localized file as a resource to
it just as a normal .satellite dll inside VS2005 IDE.

If you have any issues or concerns, please let me know. It's my pleasure to
be of assistance.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 19 Sep 2006 03:27 GMT
Hi Patrick,

I'd like to follow up on this post. I understand that you might be quite
busy or not available to work on this issue at this time. If you have any
additional information or need further assistance, feel free to let me know
at your earliest convenience.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Patrick Ruzand - 19 Sep 2006 06:36 GMT
Hi Gary,

> Hi Patrick,
>
[quoted text clipped - 3 lines]
> know
> at your earliest convenience.

Sorry for the delay, I was indeed quite busy, trying to understand
what was the magic behind the CtcFile build action.
The good news is I was finally able to localize my ctc file.
The last issue I have today is to integrate the localized .cto into the
satellite dll in an automatic way.
To be more precise, I have been able to do it by hand,
*once* I understood what the CtcFile build action does,
which is to "inject" the .cto into the VSPackage.resources
file as a byte[] resource with id=1000.
So to have the same result than the CtcFile build action you have to:
.create a localized version of VSPackage.resx (eg VSPackage.fr.resx)
.compile the localized ctc invoking ctc.exe
.add the resulting cto to the VSPackage.fr.resx as a byte[] resource id=1000
.then rebuild your project to rebuild the new VSPackage.fr.resources file
and update the new satellite dll.
Then it works.
I now have to figure out how to implement these steps automatically
in the build process, avoiding these two pass. Indeed, the problem is
I cannot edit the VSPackage.fr.resx file to add the .fr.cto since the cto
only exists at build time. A solution would have been to set the CtcFile as
the build action of my localized ctc, but then the build action failed
because it tries to add two cto files in the same .resources file (instead
of
detecting that it should add the fr.cto to the fr.resources) which
is unsupported unfortunately. Maybe the solution is to use another project
just for the satellite dll.
So for the time being, I am working on resolving this issue.
But as I have not look at it deeply yet, I will first
perform some research and tests before bothering you with it (of course,
any hints is welcome though).

My only wish at this time: improve the doc about the CtcFile build action.

Thanks for your support,
Patrick
Gary Chang[MSFT] - 19 Sep 2006 10:17 GMT
Hi Patrick,

I am glad to know you have already worked it out.

The VSIP documentation is somewhat fragmentary, we are continue improving
them. I will forward your concern to our corresponding product team for
review. Sorry for inconvenience this brought to you.

Godd Luck!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.