2012-01-29 101 views
0

我有一个网站,支持多国语言,我有资源列表每个国家我的网站支持例如:多语言ASP.NET网站的子域?

  1. Site.ar-BH.resx
  2. Site.ar,SA.resx
  3. Site.ar-EG.resx

IHE的问题是,现在我需要与同一应用程序的多个子域运行,我需要为每个子域不同的资源: 例如:

  • Site.ar-BH-subdomain1.resx
  • Site.ar-SA-subdomain1.resx
  • Site.ar-EG-subdomain1.resx

  • Site.ar-BH-subdomain2的.resx

  • Site.ar-SA-subdomain2.resx
  • Site.ar-EG-subdomain2.resx

但unfortuna我不能这样做,因为它给了我以下错误:项目包含类的定义。

" Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0101: The namespace 'Resources' already contains a definition for 'Site'"

回答

1

如果你看一下在resx.cs的RESX文件的代码隐藏,你会发现,当你重命名的文件没有重命名实际的类。你需要通过它们并重命名该类。

+0

我已经做到了这一点,上面的错误是浏览页面时,它不是一个建立错误 – user1176523 2012-01-29 15:43:38