C# 如何在windowphone中调用动态resx文件?
我有两个包含url的文件,如下所示: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
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传递区域?当然,一个地址对应一个字符串。