ResourceManager的名字问题
来源:互联网 发布:类似于upad3的软件 编辑:程序博客网 时间:2024/04/28 17:45
ResourceManager可以自动管理Assembly中的多语言资源,这使得多语言支持变得很容易。在生成一个ResourceManager实例的时候,有多个构造函数可以选择,罗列如下:
ResourceManager()()()Initializes a new instance of the ResourceManager class with default values. ResourceManager(Type)Creates a ResourceManager that looks up resources in satellite assemblies based on information from the specified Type. ResourceManager(String, Assembly)Initializes a new instance of the ResourceManager class that looks up resources contained in files derived from the specified root name using the given Assembly. ResourceManager(String, Assembly, Type)Initializes a new instance of the ResourceManager class that looks up resources contained in files derived from the specified root name using the given Assembly.对于第三个和第四个,第一个参数为 String baseName。 baseName的解释是这样的:
The root name of the resources. For example, the root name for the resource file named "MyResource.en-US.resources" is "MyResource".
实际上,这个名字应当是NameSpaceOfAssembly+ResourceFileName.
如:
AssemblyName: MyAssembly.Caculator
ResourceFileNames: MyResource.Caculator.en.resx
MyREsource.Caculator.it.resx
则baseName应该为:MyAssembly.Caculator.MyResource.Caculator。
如果resx文件位于某个文件夹下,则baseName中还要包含文件夹名字。
如:
resx文件位于Resource/NLV
baseName = MyAssembly.Caculator.Resource.NLV.MyResource.Caculator。
如果名字指定的不对,很可能会碰到调用GetString(String name)的时候,总是得不到想要的结果。因为ResourceManager实际上并没有加载指定的资源。
- ResourceManager的名字问题
- 分布式部署ResourceManager启动后马上关闭的问题
- ResourceManager
- ResourceManager
- input 标签 的名字问题
- hadoop2中ResourceManager的HA
- 关于c++名字解析的一个问题:名字空间污染
- yarn中resourcemanager启动不了,启动hregionserver后又挂掉了问题的解决
- YARN ResourceManager 进程异常退出问题追查
- struts2的Action名字的大小写问题
- attribute 的名字重复的问题
- 返回指定名字的对象代码问题
- 带名字的约瑟夫环问题
- IFeatureclass 获取不到 名字的问题
- HDFS2.X的HA+Resourcemanager的HA
- YARN ResourceManager调度器的分析
- YARN ResourceManager调度器的分析
- YARN ResourceManager调度器的分析
- 常用flash、flex资源集合
- c语言实现,用最小二乘法求解方程数多于未知变量的线性方程组的最适解(即矛盾方程组)
- 十招让你有个好脸色
- 广电总局:无证影视剧网上禁播 共享将被删
- Gilead=Hibernate Lazy Killer
- ResourceManager的名字问题
- 三秒钟快速破解加密的PDF文件
- 某行业垂直搜索引擎创业项目征集团队
- 用MLDonkey在嵌入式NAS下载BT和eMule
- asp.net取文件夹中所有文件名
- 八皇后问题的c++实现
- vnc server/viewer设置
- excel+ado
- asdasd