我们如何创建资源卫星组件组件、资源、卫星

2023-09-05 02:49:35 作者:晚点再相遇

我有使用RESX文件来存储所有显示字符串的集合。我现在想创建一个包含字符串的法文版的附属程序集。

I have an assembly which uses resx files to store all of the display strings. I now want to create a satellite assembly that contains the french versions of the strings.

可以这样在VS做?难道我只是将其正确地创建一个新的程序集,名称和包括的resx文件的本地化版本?

Can this be done in VS? Do I just create a new assembly, name it correctly and include the localized versions of the resx file?

推荐答案

只要用正确的命名添加新的资源文件中的现有的项目,和VS将创建附属程序集。

Just add the new resource file with the correct naming to the existing project, and VS will create the satellite assemblies.

命名的文件名的区域设置的的.resx。其中的文件名的匹配底座组件,而区域设置的是正常的语言环境命名的字符串。例如。 恩了通用的英语,EN-GB的英文和EN-US美国(或者,对于那些在大西洋左侧:通用英语,分别为英式英语和美式英语)

Naming is filename.locale.resx. Where filename matches the base assembly, and locale is the normal locale naming string. E.g. "en" for generic English, "en-gb" for English and "en-us" for American (or, for those on the left side of the Atlantic: generic English, British English and American English respectively).