开发者

using localizable property method versus ResXResourceSet method

开发者 https://www.devze.com 2022-12-14 07:21 出处:网络
Can anyone tell me what is more appropriate for different type开发者_运维知识库s of .net applications?The \"Localizable\" property* on a Windows Form tells Windows to create and use a .resx resource f

Can anyone tell me what is more appropriate for different type开发者_运维知识库s of .net applications?


The "Localizable" property* on a Windows Form tells Windows to create and use a .resx resource file for the string properties of the controls on the form. .NET will load the appropriate resource file depending on your current UI culture.

ResXResourceSet, detailed on MSDN here, makes it easy to programmatically read the same .resx resource file.

So in a nutshell they're really the same thing: one is an automatic mechanism for Windows Forms to use resource files, and one is for program access. Typically a Windows Forms application would use the Localizable property for fixed UI elements and the ResXResourceSet to access additional properties for prompts, variable text and whatnot.

*that makes me chuckle, as "Localizable" should be "Localisable" in British English

0

精彩评论

暂无评论...
验证码 换一张
取 消