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. Multi Language in Dont Net

Multi Language in Dont Net

Scheduled Pinned Locked Moved C#
xmlquestion
7 Posts 3 Posters 1 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.
  • S Offline
    S Offline
    Syed Shahid Hussain
    wrote on last edited by
    #1

    hi, There two ways for multilanguage that i've studied so far. 1. Resoure files 2. XML File Which is the best and why? :confused:

    Syed Shahid Hussain

    L 1 Reply Last reply
    0
    • S Syed Shahid Hussain

      hi, There two ways for multilanguage that i've studied so far. 1. Resoure files 2. XML File Which is the best and why? :confused:

      Syed Shahid Hussain

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Resource file is also a XML file..:) Use resource file, it's easy, just write your text in resource file, vs will be create automatically the class for that and you can use it. For example : Greeting = "Hello" Then in your app, you can use it using Resource.Greeting, then you get automatically the text behind it.

      S 1 Reply Last reply
      0
      • L Lost User

        Resource file is also a XML file..:) Use resource file, it's easy, just write your text in resource file, vs will be create automatically the class for that and you can use it. For example : Greeting = "Hello" Then in your app, you can use it using Resource.Greeting, then you get automatically the text behind it.

        S Offline
        S Offline
        Syed Shahid Hussain
        wrote on last edited by
        #3

        Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.

        Syed Shahid Hussain

        L K 2 Replies Last reply
        0
        • S Syed Shahid Hussain

          Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.

          Syed Shahid Hussain

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          For example, you just created a recource file, named Resource.resx Then, to set the label, use : this.label1.Text = Resource.MyText;

          S 1 Reply Last reply
          0
          • S Syed Shahid Hussain

            Thanks but how to set the label text from resource. Do v need to set the captions of all labels at the loading of the form or there is any other technique.

            Syed Shahid Hussain

            K Offline
            K Offline
            kevinnicol
            wrote on last edited by
            #5

            If you have a form you need localized, in the designer view, set its Localizable property to be true, then set it's Language property to be whatever language you are localizing. This essentialy creates a second copy of the form, in which you can change the text on all the controls, resize them to fit different length text, while still allowing you to switch back to the default language without the resizes and the text changes. All of you work will automatically get stored in a resex file.

            S 1 Reply Last reply
            0
            • L Lost User

              For example, you just created a recource file, named Resource.resx Then, to set the label, use : this.label1.Text = Resource.MyText;

              S Offline
              S Offline
              Syed Shahid Hussain
              wrote on last edited by
              #6

              but it would not be a lengthy process ???

              Syed Shahid Hussain

              1 Reply Last reply
              0
              • K kevinnicol

                If you have a form you need localized, in the designer view, set its Localizable property to be true, then set it's Language property to be whatever language you are localizing. This essentialy creates a second copy of the form, in which you can change the text on all the controls, resize them to fit different length text, while still allowing you to switch back to the default language without the resizes and the text changes. All of you work will automatically get stored in a resex file.

                S Offline
                S Offline
                Syed Shahid Hussain
                wrote on last edited by
                #7

                Thanks

                Syed Shahid Hussain

                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