- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我已经为不同的文化创建了 DLL(DynamicResourceDLL),如下所示
DynamicResourceDLL.Cart.Cart //English
DynamicResourceDLL.Cart.Cart_de_DE
DynamicResourceDLL.Cart.Cart_es_ES
DynamicResourceDLL.Cart.Cart_fr_FR
我在我的项目中添加了这个DynamicResourceDLL
dll并尝试获取key的值
string strCityEnglish = DynamicResourceDLL.Cart.Cart.City //it's working fine
但是
string strCityDe = DynamicResourceDLL.Cart.Cart_de_DE.City //it's not working
我遇到了错误
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DynamicResourceDLL.Cart.Cart_de_DE.resources" was correctly embedded or linked into assembly "ExportToExcelFromDataTable" at compile time, or that all the satellite assemblies required are loadable and fully signed.
请让我知道如何通过代码将此 Dll 用于不同的文化,或者如果我在上面有任何错误,请提出建议。
最佳答案
这是一个 ASP.NET 应用程序吗?如果是这样,下面的资源将为您提供帮助。
http://msdn.microsoft.com/en-us/library/1ztca10y(v=vs.85).aspx
如果是 Windows 应用程序,请参阅下面的示例。
http://www.codeproject.com/Articles/352105/Satellite-Assembly-Example-in-Csharp-Step-by-Step
希望这对您有所帮助。谢谢。
关于c# - 如何为不同的文化使用资源 Dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17945508/
如何指定输入字符串的哪一部分是日期和月份? 如果输入是 01/10/2017 ,这可以读作 2017 年 10 月 1 日 和 2017 年 1 月 10 日 .两者都是正确的。 我想明确指出 01是
我的 silverlight 应用程序的数据网格中有一个日期列。我需要以 24 小时格式显示时间。为了实现这一点,我修改了 Application_Startup 事件中的 UI 区域性,如下所示:
对于 CultureInfo,调用 DateTimeFormat.AbbreviatedMonthNames 会返回一个数组,其中每个月都以 . 结束,例如 ['jan .',... 'dis.'].
最近,DevOps的采用导致了企业计算的重大转变。除无服务器计算,动态配置和即付即用成本模型之类的功能外,DevOps的实践对于组织可以发挥一些增值效益,例如提高敏捷性,速度和降低成本,也非常有用。
我一直在努力改变 numbro 的文化。我尝试了简单的方法,但出现错误: Unknown culture : ' + code numbro.culture('fr-FR'); 我尝试过这样的: co
有一个 mvc web 应用程序,CSS 在样式表中编码,将在 View 中使用。 有什么办法可以实现下面的场景: When there is a change of language culture
我的 .NET 4.0 项目中嵌入了字符串资源:Strings.resx 和 Strings.de.resx。 在生产代码中,根据 Strings.Culture 的值检索正确的本地化字符串: Str
如何本地化除今天以外的星期几? 以下内容适用于当天: DateTime.Now.ToString("dddd", new CultureInfo("it-IT")); 但是我怎样才能本地化一周中的所有
你好,我想看看是否有更好的方法将字符串解析为涵盖各种格式的 Decimal 1.30 美元 1.50 英镑 2,50 欧元 2,50 € 2.500,00 € 我看到很多用culture来转换. &
你好,我想看看是否有更好的方法将字符串解析为涵盖各种格式的 Decimal 1.30 美元 1.50 英镑 2,50 欧元 2,50 € 2.500,00 € 我看到很多用culture来转换. &
我的应用程序的每个用户都会选择他们的国家/地区,然后将其存储在 cookie 中并存储以供以后请求。一切正常,但我需要在 session 开始时设置文化。我目前正在尝试将 web.config 中的区
我有一个 CLR .NET dll 和 SQL 服务器。系统本地设置(Region/administrative/locallanaguagesettings)从 en-IN 更改为 en-US。但是
你好, 我正在使用 Windows XP sp2 作为我的开发平台, 我在显示 时遇到问题货币符号 . 你看,对于马来西亚来说,正确的货币符号是 RM , 但是当我使用 uiCulture="ms"c
我用 C# 编写了一个报告渲染器,它运行报告并将报告附加到电子邮件中。这一切都很好,除了在报告标题中列出的参数的日期格式不正确。所有报告的语言都设置为 =User!Language 并且使用 Form
这应该很简单,但我似乎找不到这个问题的答案...... 我正在使用 Visual Studio 2008 开发 C# 应用程序,该应用程序支持多种不同的语言。在开发机器上测试不同的语言很简单(例如临时
我正在尝试运行这条确切的线,但它不工作。有谁知道原因吗? Convert.ToBoolean("verdadero", new System.Globalization.CultureInfo("ES
我对数据库编程不是很熟悉,但我有一个Mysql数据库,我在C#下使用Dblinq访问它。现在,当我输入日期、数字等时,使用英语符号,但我的客户需要德语。如何将我的数据库从英语切换为德语? (数据库仍然
我正在尝试使用以下方法更改内置的 .Net 区域性 fr-CA: CultureAndRegionInfoBuilder cib = new CultureAndRegionInfoBuild
我的 orderby linq 表达式有问题。它以错误的顺序生成输出。我来自丹麦并创建了一个丹麦语网站,因此订单必须准确无误。 这是我的查询: var model = (from w in db.Ne
是否可以即时更改 WinRT 中的 UI 文化?我找到了 ApplicationLanguages.PrimaryLanguageOverride = "en"; ,但这仅在显示应用程序 UI 之前有
我是一名优秀的程序员,十分优秀!