Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在windowphone中调用动态resx文件?_C#_Windows Phone 8_Localization - Fatal编程技术网

C# 如何在windowphone中调用动态resx文件?

C# 如何在windowphone中调用动态resx文件?,c#,windows-phone-8,localization,C#,Windows Phone 8,Localization,我有两个包含url的文件,如下所示: AppResource1.resx getProduct http://neaah.com/getProduc?region=en getCat http://neaah.com/getProduc?region=en ..... AppResource2.resx getProduct http://neaah.com/getProduc?region=fr getC

我有两个包含url的文件,如下所示:

AppResource1.resx
     getProduct      http://neaah.com/getProduc?region=en
     getCat          http://neaah.com/getProduc?region=en
     .....
 AppResource2.resx
     getProduct      http://neaah.com/getProduc?region=fr
     getCat          http://neaah.com/getProduc?region=fr
     .....
因此,如何获取Dynamic resx文件。例如,抱歉,我不知道如何调用Dynamic resx文件,但这仅说明:

Resource resx=new Resource(); 
if(region=="en"){
   resx=resx.AppResource1;
}
if(region=="fr"){
 resx=resx.AppResource2;
}
我可以称之为:

resx.getProduct

这些文件不应该像AppResources.en-US.resx和AppResources.fr-fr.resx这样吗?是的,不应该,而且不是多语言的。我认为您不应该为此使用资源。如果您只有不同区域的地址,为什么不只使用一个字符串(如{0}),然后使用string.Format传递区域?当然,一个地址对应一个字符串。