我正在开发SharpDevelop中开发的本地化应用程序。根据tutorial我遇到了一个错误:使用SharpDevelop进行本地化
Could not find any resources appropriate for the specified culture (or the neutral culture) on disk. baseName:
我使用项目创建的ressource文件|添加|新项目分别为“空资源文件”(我找不到“Assembly Resource file”)。此外,我已将“Build action”设置为“EmbeddedResource”。
在节目我有一类执行以下操作
// load the resource file once
resourceManager = ResourceManager.CreateFileBasedResourceManager(file, filePath, null);
// depending on user selection, I set the CultureInfo in the code behind the form, i.e.
Thread.CurrentThread.CurrentUICulture = locales[0]; // which contains "en"
// and that's the method of the same class used to lookup the values
public string getValue (string key)
{
return resourceManager.GetString(key);
}
的SharpDevelop 3.0.0.3437 .NET版本2.0.50727.3053
通过评论虽然经过精心准备和谷歌上搜索了很久,我无法找到一个例子或解决方案。因此,问题:
- 如何将文化添加到资源文件本身?
- 你能提供一个例子或链接吗?
非常感谢!