By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

FxCop Do not pass literals as localized parameters warning

P: n/a
FxCop gives a "Do not pass literals as localized parameters" warning on the
dot Text properties of my Form1 components in Form1.Designer. These are the
strings that label the buttons and form. I assume that I don't really need
to retrieve these strings using ResourceManager, or do I? How do I avoid
getting this error?

-Tim Sprout
Feb 7 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
FxCop gives a "Do not pass literals as localized parameters" warning on the
dot Text properties of my Form1 components in Form1.Designer. These are the
strings that label the buttons and form. I assume that I don't really need
to retrieve these strings using ResourceManager, or do I? How do I avoid
getting this error?
Yes, you need to retrieve them with a ResourceManager.

But there is not need to do this manually.
Just mark the form as localizable (in Properties) and the code generated by
the form editor will do the right thing (the strings will move to a resx
file)
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Feb 8 '07 #2

P: n/a
Tim Sprout wrote:
FxCop gives a "Do not pass literals as localized parameters" warning on
the
dot Text properties of my Form1 components in Form1.Designer. These are
the
strings that label the buttons and form. I assume that I don't really
need
to retrieve these strings using ResourceManager, or do I? How do I avoid
getting this error?
Mihai Nita wrote:

Yes, you need to retrieve them with a ResourceManager.

But there is not need to do this manually.
Just mark the form as localizable (in Properties) and the code generated
by
the form editor will do the right thing (the strings will move to a resx
file)

Thank you.

Using your advice I searched and found:

Walkthrough: Localizing Windows Forms

http://msdn2.microsoft.com/en-us/lib...d3(vs.80).aspx

-Tim Sprout
Feb 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.