Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

.net - Resource String Location

Where is the best location to place resource strings? Does it depend on scope? Currently most of our strings are being placed at the project level, but certain strings are only needed for one form. My thoughts would be that these strings should be placed as close to their use as possible.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should strongly favor using resources at the form level (set the form's Localizable property to True in the designer). The designer has very good support for it and the WinRes.exe utility is available to localize strings off-line. No code is required.

Localizing project resource strings is possible but not well supported by the IDE. Check my answer in this thread for an approach.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...