Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Best practice to make the program multilingual

Best practice to make the program multilingual

Scheduled Pinned Locked Moved Visual Basic
questiondiscussion
17 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R re infecta

    What is the best way to make my program in several languages? Should I create text files that contain label text, window titles, messagebox texts in different langugaes or what do you recommend?

    N Offline
    N Offline
    Navneet Hegde
    wrote on last edited by
    #8

    Hi Dear, The way possible could be using database to handle it.Create table with with columns like id , code , conversion and languageid .then use a function or dll to convert it into required lanuage . Take note Change in language would require you to reload application. Thanks & Pleasure Navneet Hegde Nashik

    Develop2Program & Program2Develop

    1 Reply Last reply
    0
    • C Christian Graus

      Store all your strings in the application resources and ship different resource files.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      R Offline
      R Offline
      re infecta
      wrote on last edited by
      #9

      I a bit of a beginner. How do you do this in practice? Could you give me an example? Let's say label1.Text is in Finnish "Jotain" and in English "Something".

      1 Reply Last reply
      0
      • M MatrixCoder

        Try this article: INI File Class. If you need further help, just search CodeProject for "Ini Files".


        Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #10

        You mean to tell me that you're going to go through the hassel of reading the text file and changing the Text property of every control in your application yourself? Why not just let the Framework do it for you??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        M 1 Reply Last reply
        0
        • R re infecta

          What is the best way to make my program in several languages? Should I create text files that contain label text, window titles, messagebox texts in different langugaes or what do you recommend?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #11

          You asked for best practices. They're covered here[^].

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          G 1 Reply Last reply
          0
          • R re infecta

            OK, I have never used INI files. Could you give me some practical example or reference in web? Thanks?

            J Offline
            J Offline
            Jeremy Falcon
            wrote on last edited by
            #12

            re infecta wrote:

            Could you give me some practical example or reference in web?

            Speaking in terms of practicality, don't listen to MatrixCoder. Use the resource files as Christian suggests, because practically speaking you'll find more tools to help you with those (in regards to editing for multi-language that is), and INI files are a tad slower anyway.

            Jeremy Falcon "It's a good thing to do and a tasty way to do it." - Wilford Brimley[^]

            1 Reply Last reply
            0
            • D Dave Kreskowiak

              You mean to tell me that you're going to go through the hassel of reading the text file and changing the Text property of every control in your application yourself? Why not just let the Framework do it for you??

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              M Offline
              M Offline
              MatrixCoder
              wrote on last edited by
              #13

              Dave Kreskowiak wrote:

              Why not just let the Framework do it for you??

              I hate the way the .NET Framework handles stuff like that, I prefer to do it the old fashioned way. Personal preference.


              Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

              D 1 Reply Last reply
              0
              • M MatrixCoder

                Dave Kreskowiak wrote:

                Why not just let the Framework do it for you??

                I hate the way the .NET Framework handles stuff like that, I prefer to do it the old fashioned way. Personal preference.


                Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #14

                It handles it much better than you do. How about a case where your application has a couple dozen forms and a couple hundred controls? I bet your method is pretty slow.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                M 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  It handles it much better than you do. How about a case where your application has a couple dozen forms and a couple hundred controls? I bet your method is pretty slow.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  M Offline
                  M Offline
                  MatrixCoder
                  wrote on last edited by
                  #15

                  NSIS and many others manage.


                  Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.

                  1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    You asked for best practices. They're covered here[^].

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007

                    G Offline
                    G Offline
                    gacracker
                    wrote on last edited by
                    #16

                    Although I have not done this yet, I do believe the best approach is the DB approach. A function wrapper to the DB using an ID would allow you to retrieve translations from multiple languages without application reloads, etc. Also, with a local caching mechanism this approach would be very close to the Resource file approach with regard to performance and would allow you the most flexibility. Again, I have not done this and I would like to hear others thoughts as well before investing a lot of time on this effort. I would also like to see a discussion on supporting multi currency but perhaps that should be a new message thread.

                    D 1 Reply Last reply
                    0
                    • G gacracker

                      Although I have not done this yet, I do believe the best approach is the DB approach. A function wrapper to the DB using an ID would allow you to retrieve translations from multiple languages without application reloads, etc. Also, with a local caching mechanism this approach would be very close to the Resource file approach with regard to performance and would allow you the most flexibility. Again, I have not done this and I would like to hear others thoughts as well before investing a lot of time on this effort. I would also like to see a discussion on supporting multi currency but perhaps that should be a new message thread.

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #17

                      This doesn't work if you don't have a database. There's no need to retrieve anything if you use the .NET methods. The CLR will do it for you out of the resources you include with your app. Why write a bunch of code when you don't have to write ANY?

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups