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 / .NET Framework / Internationalization / December 2005

Tip: Looking for answers? Try searching our database.

Localizing Menu Items - Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krishnan - 28 Nov 2005 12:43 GMT
Hi,

The norm in .Net seems to be keying the name of the control in the resource
file for a value in the particular language. For e.g., if cmdOpen is a
commad button, then:

MyResource.en-us.resx will contain:
key                      value
----                    -------
cmdOpen.Text    Open

and, MyResource.fr-FR.resx will contain:
key                      value
----                     ------
cmdOpen.Text    Ouvrez

However, this depends on accessing the "Name" property of the control at
runtime. Menus do not expose the name property. What is the thumb rule to
localize menus in dot net?

TIA
Krishnan
Garrett McGowan[MSFT] - 06 Dec 2005 00:24 GMT
Hi Krishnan. If I understand your question correctly, you want to localize
the Text value for menu items in your WinForms application.

The easiest way to do this is to simply mark the Localizable property for
the form as True, change the target language in the Language property, and
then edit the menu items on the form. When you load the resulting RESX file
in the resource editor, it should show each menu name as you describe below
(e.g., fileToolStripMenuItem.Text | &File). This is how it works for Visual
Studio 2005, though the mechanics are the same for Visual Studio .NET 2003.

Cheers,
Garrett McGowan [MSFT Developer International]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
>From: "Krishnan" <krishnan.ramaswami@newsgroups.nospam>
>Subject: Localizing Menu Items - Help
[quoted text clipped - 23 lines]
>TIA
>Krishnan
Krishnan - 07 Dec 2005 05:54 GMT
Thanks.

Krishnan
> Hi Krishnan. If I understand your question correctly, you want to localize
> the Text value for menu items in your WinForms application.
[quoted text clipped - 46 lines]
>>TIA
>>Krishnan

Rate this thread:







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.