fixed localization

This commit is contained in:
eeichinger
2008-11-07 13:57:17 +00:00
parent 18a0a66ca0
commit b0117a0b37
7 changed files with 178 additions and 98 deletions

View File

@@ -24,7 +24,9 @@
<system.web>
<compilation debug="true" />
<!-- see http://msdn.microsoft.com/en-us/library/aa905797.aspx
<globalization uiCulture="auto" culture="auto" resourceProviderFactoryType="CustomResourceProviders.DBResourceProviderFactory, CustomResourceProviders, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f201d8942d9dbbb1" />
-->
<!--
The following needs to be configured in order to enable Spring.NET Web Framework features
-->
@@ -51,13 +53,13 @@
<object type="WithResources.aspx">
<property name="Localizer" ref="localizer" />
</object>
<object type="WithoutResources.aspx">
<property name="Localizer" ref="localizer" />
</object>
<object id="localizer" type="Spring.Globalization.Localizers.ResourceSetLocalizer, Spring.Core" />
</objects>
</spring>

View File

@@ -1,2 +1,2 @@
<%@ Page language="c#" EnableSessionState="ReadOnly" AutoEventWireup="false" Inherits="Spring.Web.UI.Page" %>
<%="OK"%>
<%=this.GetMessage("OK")%>

View File

@@ -21,6 +21,7 @@
#region Imports
using System;
using System.Diagnostics;
using NUnit.Framework;
using NUnitAspEx;
@@ -42,7 +43,8 @@ namespace Spring.Web.Support
{
AspTestClient client = new AspTestClient();
string result = client.GetPage("WithResources.aspx");
Assert.AreEqual("<span id=\"Result\"></span>", result);
Trace.Write(result);
Assert.AreEqual("<span id=\"Result\">FromResource</span>", result);
}
[Test]