Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version
Go to top

Creating multilingual websites - Part 2

, 25 Aug 2004
Creating multilingual websites - Part 2
LocalizedSamplePart2.zip
LocalizedSample
bin
Localization.dll
LocalizedSample.dll
language
en-CA
fr-CA
Localization
bin
Localization.csproj.user
Localization.resharperoptions
LocalizedSample.csproj.webinfo
LocalizedSample.resharperoptions
LocalizedSamplePart2VB.zip
LocalizedSampleVB
bin
Localization.dll
LocalizedSampleVB.dll
language
en-CA
fr-CA
Localization
bin
Localization.dll
Localization.vbproj.user
LocalizedSampleVB.resharperoptions
LocalizedSampleVB.vbproj.webinfo
Imports System.Web.UI
Imports System.Text

Public NotInheritable Class LocalizedUtility
   Private Sub New()
   End Sub

   Public Shared Function ReplaceParameters(ByVal controls As ControlCollection, ByVal text As String) As String
      If controls Is Nothing OrElse controls.Count = 0 Then
         Return text
      End If

      Dim sb As New StringBuilder(text)
      For i As Integer = 0 To controls.Count - 1
         If TypeOf controls(i) Is Parameter Then
            Dim parameter As Parameter = CType(controls(i), Parameter)
            Dim key As String = parameter.Key
            Dim value As String = parameter.Value
            sb.Replace("{"c + key.ToUpper() + "}"c, value)
         End If
      Next
      Return sb.ToString()
   End Function
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Karl Seguin

Canada Canada
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 26 Aug 2004
Article Copyright 2004 by Karl Seguin
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid