[Localizable(true)]
-
I have a class property that I want to be localisable. The MSDN gives an example as:
[ Description ( "The name of this section" ), Category ( "Section" ), DisplayName ( "Section name" ), Localizable ( true ) ] public int MyProperty { get { // Insert code here. return 0; } set { // Insert code here. } }
The help files sayWhen code is generated for a component, members that are marked with the
LocalizableAttribute set to true have their property values saved in resource
files. You can localize these resource files without modifying the code.So I would expect all the attributes to appear in the .resx file, but they don't. Is this a bug, or am I doing something wrong?
-
I have a class property that I want to be localisable. The MSDN gives an example as:
[ Description ( "The name of this section" ), Category ( "Section" ), DisplayName ( "Section name" ), Localizable ( true ) ] public int MyProperty { get { // Insert code here. return 0; } set { // Insert code here. } }
The help files sayWhen code is generated for a component, members that are marked with the
LocalizableAttribute set to true have their property values saved in resource
files. You can localize these resource files without modifying the code.So I would expect all the attributes to appear in the .resx file, but they don't. Is this a bug, or am I doing something wrong?
I think you must also set Localizable of the Form the control is placed on also to true.
-
I think you must also set Localizable of the Form the control is placed on also to true.
The class isn't on a form. It's just a holder for information that can be used by PropertyGrid.