<%@ Page Language="VB" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import namespace="System.Resources" %>
<%@ Import namespace="System.Threading" %>
<script runat="server">
sub Page_Load(Sender as Object, e as EventArgs)
dim objRM as ResourceManager
dim strLanguage as string = Request.UserLanguages(0).ToString
dim objCulture as new CultureInfo(strLanguage)
Thread.CurrentThread.CurrentCulture = new CultureInfo(strLanguage)
Thread.CurrentThread.CurrentUICulture = new CultureInfo(strLanguage)
objRM = ResourceManager.CreateFileBasedResourceManager("data",Server.MapPath("."), Nothing)
lblGreeting.Text = objRM.GetString("Greeting")
objRM.ReleaseAllResources
end sub
</script>
<html><body>
<b><asp:Label id="lblGreeting" runat="server"/></b>
</body></html>
File: data.en-us.txt
Greeting=Welcome!
File: data.fr-fr.txt
Greeting=Bonjour!