I have an ASP.NET site with some "global" resources:
\App_GlobalResources ContosoFrobberResource.resx
This is a complement to the local resources associated with each aspx file:
\App_LocalResources Materials.aspx.resx Notes.aspx.resx OrderHistory.aspx.resx
Now I want to localize the site in another language standard (for example, en ). I create a resx file for each "local" resource:
\App_LocalResources Materials.aspx.en.resx Materials.aspx.en-us.resx Materials.aspx.en-uk.resx Materials.aspx.en-sg.resx Notes.aspx.en.resx Notes.aspx.en-us.resx Notes.aspx.en-uk.resx Notes.aspx.en-sg.resx OrderHistory.aspx.en.resx OrderHistory.aspx.en-us.resx OrderHistory.aspx.en-uk.resx OrderHistory.aspx.en-sg.resx
And all this works great; The site displays customized English versions for
- USA (en-US)
- United Kingdom (en-UK)
- Singapore (en-SG)
as well as reserve for general
The problem occurs when I try to localize resources in App_GlobalResources :
\App_GlobalResources ContosoFrobberResource.resx ContosoFrobberResource.en-us.resx
Error page failed:
CS0101: The Resource namespace already contains a definition for ContosoFrobberResource
How to localize App_GlobalResources on an ASP.NET website?
Bonus Chat
ContosoFrobberResource.resx
<?xml version="1.0" encoding="utf-8"?> <root> <data name="ProjectDueDate" xml:space="preserve"> <value>Proposal Due Date</value> </data> </root>
ContosoFrobberResource.qps.resx
<?xml version="1.0" encoding="utf-8"?> <root> <data name="ProjectDueDate" xml:space="preserve"> <value>Prȍposẳl Duɇ Dãtē</value> </data> </root>
source share