Results 1 to 10 of 10

Thread: [2005] Globalizing Application

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    [2005] Globalizing Application

    I have been given the task to globalize a current asp.net 2.0 application. The app should display text, numbers, currency, etc. in the native language of the country the user is logged in to (chosen during login process).

    Is there a site or book that anyone knows of that explains this process step-by-step. I've done some searching on-line, but still haven't found a resource that explains it to me step by step.

    Any help would be greatly appreciated.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Globalizing Application

    Oh come now, I know someone has implemented multi-language support into an application before.

    I thought for sure mendhak would have weighed in by now (hopes calling him out will get him to respond).
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Globalizing Application

    I have. There isn't a step by step way to do this because there's always the assumption that you are starting a new application with localization in mind. You will need to use resx files to store your strings and ensure that when you perform string/date/numeric/date conversions that you always use CultureInfo or specify a culture.

    For this purpose, there are two articles for you to read which you may have read already (in which case you'll need to read again and apply to your application)

    http://support.microsoft.com/kb/917414

    http://msdn.microsoft.com/en-us/libr...6f(VS.80).aspx

  4. #4
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: [2005] Globalizing Application

    mendhak saves the day.... was trying to locate those articles earlier but couldnt for some reason

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Globalizing Application

    I found a pretty good video for this on asp.net. But it's on my work PC. Most of the cool translation stuff he does, such as displaying culture specific calendars and currency isn't even done with resource files. Visual Studio 2005, or .NET 2.0 has some pretty powerful built-in language conversion.

    But anywho, I followed the steps in the video, and the little "localized" app worked fine. However, when I tried to apply the methods to the current app, the language never changed.

    Could it have something to do with the Ajax?
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  6. #6
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: [2005] Globalizing Application

    personally not sure...but the frog master can help

    maybe this will point you in the right direction in regards to ajax?
    http://www.asp.net/Ajax/Documentatio...Resources.aspx

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Globalizing Application

    You're talking about the CurrentCulture format providers which in turn determine calendars and currencies and strings and all that. But we don't know what you did in your application so we can't really tell what's wrong. How did you determine or set the current culture?

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Globalizing Application

    This is the video I used.

    I didn't use any resource files. If you notice, in the later part of the video, he uses the CurrentCulture class to change the way the calendar and currency format looks.

    If you don't want to watch the video, I have the code I used (and tried to use in my actual app) on my work PC, and I'll post it tomorrow.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Location
    Between Try & Catch
    Posts
    249

    Re: [2005] Globalizing Application

    This is the code I'm using from the video.

    Code:
    Protected Overrides Sub InitializeCulture()
    
            Dim lang As String = Request("Language1")
    
            If lang IsNot Nothing Or lang <> "" Then
                Thread.CurrentThread.CurrentUICulture = New CultureInfo(lang)
                Thread.CurrentThread.CurrentCulture =  CultureInfo.CreateSpecificCulture(lang)
            End If
        End Sub
    "Language1" is a drop-down list on the main page. When somebody chooses a language, the value (i.e. en-US) is passed to this procedure and the culture is set.

    The problem with my main application is that even if this procedure is called, the text on the page does not change languages, which is why I was questioning if it was the Ajax causing the problem.
    If my post helped you, please rate it!

    Languages: VB/ASP.NET 2005, C# 2008,VB6
    Databases: Oracle (knowledge not currently in use), DB2

    FROM Customers
    WHERE We_Know_What_We_Want <> DB.Null
    SELECT *
    0 rows returned

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Globalizing Application

    Probably, because when you postback with AJAX if there is no 'Language1' value being sent via POST or GET, then it just won't change at all and will remain the same. Place a breakpoint on that method to see what happens everytime you do an AJAX postback.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width