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. C#
  4. Suggestion to do a multilanguage project

Suggestion to do a multilanguage project

Scheduled Pinned Locked Moved C#
questiondatabasehelp
6 Posts 6 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.
  • A Offline
    A Offline
    Arunkumar Koloth
    wrote on last edited by
    #1

    Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?

    Arunkumar.T

    V N B J 4 Replies Last reply
    0
    • A Arunkumar Koloth

      Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?

      Arunkumar.T

      V Offline
      V Offline
      venomation
      wrote on last edited by
      #2

      Some way or another your are going to end up storing a collections of string elements (to be mapped onto your GUI) that relate to many language versions. EnterButton => English:"Enter",Spanish:... Localization I think is the only way you can achieve such effect... Maybe look at http://ondotnet.com/pub/a/dotnet/2002/09/30/manager.html[^], a four part series that could help?

      1 Reply Last reply
      0
      • A Arunkumar Koloth

        Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?

        Arunkumar.T

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        Since you want the values to be retrieved from a database rather than using a resource file you will need to method to map the display values to the contents of the database. You can do this by either using the LCID as a key to lookup values or by creating a separate database table for each language and changing the connection string based on the LCID. I prefer the former method.


        No comment

        1 Reply Last reply
        0
        • A Arunkumar Koloth

          Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?

          Arunkumar.T

          B Offline
          B Offline
          Bernhard Hiller
          wrote on last edited by
          #4

          You can set the Current UI Culture of a thread by

          Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-DE");

          Note that a new thread inherits the UI Culture from Windows, not from the parent thread; i.e. you have to set it again. For forms which are already displayed, you'll need an event and an event handler for a "UICultureChanged" event.

          J 1 Reply Last reply
          0
          • B Bernhard Hiller

            You can set the Current UI Culture of a thread by

            Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("de-DE");

            Note that a new thread inherits the UI Culture from Windows, not from the parent thread; i.e. you have to set it again. For forms which are already displayed, you'll need an event and an event handler for a "UICultureChanged" event.

            J Offline
            J Offline
            joost versteegen
            wrote on last edited by
            #5

            Create a interface ITranslateable with one method : void Translate(). Let each Form implement the interface. When a form is loaded (load event) you call the interface method. Also when the language is changed you call the interface method for each active form (keep a reference!). In the implementation of the method you call a database search for each control that needs translation: ie comboBox2.Text = Database.getTranslation("Form3.comboBox2"). In the database you have a table with all gui-objects (ie. "Form3.comboBox2"), and a table with an entry for each gui-object/language combination. Also when you get data from the database (to fill a grid or so) the data must be translated? It can be done in the same table (ie "tablename.objectname").

            1 Reply Last reply
            0
            • A Arunkumar Koloth

              Hai, Everyone I developed a application for entering datas for a company now i want to add multilingual support for the application,i readed about the Form localization but it is not a practical way. Iam Planning to take translations from my database table. in future admin can add more languages. My Application have a login form. i created a combobox there named language. when a my application start the login page will display. my problem is how can i change language for all form eg:(when a user change combox index i need to change all form's language) I thing you understand what is my problem is. Can anyone Please Help me To Do it?

              Arunkumar.T

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              Arunkumar.Koloth wrote:

              Iam Planning to take translations from my database table. in future admin can add more languages.

              Internationalization is NOT only about language transalation. You need to research the issues involved first and AFTER that then consider how to design/implement it.

              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