Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2007, 11:11 AM
Authorized User
 
Join Date: Dec 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default MultiLanguage Support

Hi everyone,

I am currently using vs2002 vb.net to develop some website that requires multilanguage (english, german, italian). I've created resx files for each language (created them by add new web form, assembly class).

1. I don't understand is if I create these resx files independent of the original aspx file, how are they suppose to link?

2. How to display values depending on the local users culture settings?

I have some code that I started off with and had no avale. Please could someone help. I have cut out the

Code:
Imports System.Globalization
Imports System.Resources
Imports System.Threading

Public Class AutoComplete
    Inherits System.Web.UI.Page
    Protected WithEvents text1 As System.Web.UI.WebControls.TextBox
    Protected WithEvents Label1 As System.Web.UI.WebControls.Label

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try

            Thread.CurrentThread.CurrentCulture = _
             CultureInfo.CreateSpecificCulture(Request.UserLanguages(0))
            Thread.CurrentThread.CurrentUICulture = _
              Thread.CurrentThread.CurrentCulture

            Dim rm As ResourceManager
            Dim rr As ResourceReader = New ResourceReader(Server.MapPath("App_LocalResources/AutoComplete.aspx.de.resx"))

            Dim d As DictionaryEntry
            Dim temp As String

            For Each d In rr
                temp = temp & d.Key & ":   " & d.Value & "<br>"
            Next d
            Label1.Text = temp
            rr.Close()

            'Dim objRm As ResourceManager = ResourceManager.CreateFileBasedResourceManager( _
            ' "AutoComplete", Server.MapPath("./"), Nothing)
            'Label1.Text = objRm.GetString("test")

        Catch e1 As Exception
            Response.Write(e1.Message)
        End Try
    End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error-Object does not support doesn't support this bootsy Classic ASP Basics 1 May 25th, 2008 07:14 PM
Meaning Of MultiLanguage nir_pankaj C# 8 March 8th, 2007 01:10 PM
Multilanguage software tiyyob .NET Framework 2.0 1 June 14th, 2006 08:51 AM
Multilanguage Olaf_l Classic ASP Basics 3 March 23rd, 2005 06:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.