【发布时间】:2017-11-14 20:09:34
【问题描述】:
我开发了一个多语言应用程序,我的资源文件位于 App_GlobalResources 中。资源文件结构如下:
App_GlobalResources
--------Resource.ar.resx
--------Resource.resx
我想显示两种文化的资源键值。如何在两种文化中获得特定资源键的价值。
【问题讨论】:
标签: c# multilingual resourcemanager
我开发了一个多语言应用程序,我的资源文件位于 App_GlobalResources 中。资源文件结构如下:
App_GlobalResources
--------Resource.ar.resx
--------Resource.resx
我想显示两种文化的资源键值。如何在两种文化中获得特定资源键的价值。
【问题讨论】:
标签: c# multilingual resourcemanager
你可以用 ResourceManager 做到这一点
ResourceManager rm = new ResourceManager(typeof(*Your Resource Class*));
rm.GetString("Resource Key", new CultureInfo("en"));
rm.GetString("Resource Key", new CultureInfo("ar"));
【讨论】: