[英]get value of specific resource string
我開發了一個多語言應用程序,我的資源文件位於App_GlobalResources中。 資源文件結構如下:
App_GlobalResources
-------- Resource.ar.resx
-------- Resource.resx
我想同時顯示兩種文化的resourcekey值。 如何在兩種文化中獲得特定資源密鑰的價值。
你可以用ResourceManager做到這一點
ResourceManager rm = new ResourceManager(typeof(*Your Resource Class*));
rm.GetString("Resource Key", new CultureInfo("en"));
rm.GetString("Resource Key", new CultureInfo("ar"));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.