2012-01-29 102 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