Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinForms strings in resource files, wired up in designer

I'm trying to localise a WinForms app for multiple languages. I'm trying to find a way to set my form labels/buttons text properties to read from the resources file in the designer (rather than having to maintain a chunk of code that sets them programatically).

I've found I can set form.Localizable=true, but then the resources are read from a file alongside the form, but many of mine are shared across multiple forms.

Is there any way to set a label's text in the designer, to a value stored in a project-level resx file?

like image 738
Danny Tuppeny Avatar asked Dec 03 '09 21:12

Danny Tuppeny


People also ask

How do I add resources to Winforms?

On the Tools menu, click Resource Files. In the Resource Files dialog box, click Add. In the Add File dialog box, select the file that you updated, and then click OK. In the Microsoft Office InfoPath dialog box, click Replace the existing file, and then click OK.

Can you develop Winforms on Linux?

For now, Winforms only stays on windows. Avalonia is a substitute for it.

Does Microsoft support Winforms?

Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .


1 Answers

To answer the question, no.

But IMO, this should not be done anyways if the text will be static.

Have a read at my answers on localization and resources:
Resource string location
Globalize an existing Windows Forms application
Using .resx files for global application messages

like image 134
Jon Seigel Avatar answered Oct 05 '22 23:10

Jon Seigel