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. Resource editor

Resource editor

Scheduled Pinned Locked Moved C#
csharphelpquestionlearning
3 Posts 2 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.
  • M Offline
    M Offline
    Manish K Agarwal
    wrote on last edited by
    #1

    In C# resource editor let say I am putting a label string say "Hello Label". Resource editor generate the code for it in InitializeComponent() like this.lblMessage.Text = "Hello Label"; I am coding for multiple languages (German/French). So it create lot of problem for me. I have to change all these lines to this.lblMessage.Text = resManager.GetString("txtHello"); I am storing all these messages in a MyApp.resx files and maintaining a separate .resx file for each language like for German there is a MyApp.de.resx and setting the UICulture in my code. Is there any simpler way for this? Sonork ID 100:25668

    J 1 Reply Last reply
    0
    • M Manish K Agarwal

      In C# resource editor let say I am putting a label string say "Hello Label". Resource editor generate the code for it in InitializeComponent() like this.lblMessage.Text = "Hello Label"; I am coding for multiple languages (German/French). So it create lot of problem for me. I have to change all these lines to this.lblMessage.Text = resManager.GetString("txtHello"); I am storing all these messages in a MyApp.resx files and maintaining a separate .resx file for each language like for German there is a MyApp.de.resx and setting the UICulture in my code. Is there any simpler way for this? Sonork ID 100:25668

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      I think you can do the same thing using the properties editor. First set the Localizable property on the form to true, then set the form's Language property to the first language. Now proceed to set all of the properties that need localized strings. Then change the Language property to the next language, and change all of the localized strings, repeat. I did this while playing around a couple months ago and it seemed to produce what you want. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation

      M 1 Reply Last reply
      0
      • J James T Johnson

        I think you can do the same thing using the properties editor. First set the Localizable property on the form to true, then set the form's Language property to the first language. Now proceed to set all of the properties that need localized strings. Then change the Language property to the next language, and change all of the localized strings, repeat. I did this while playing around a couple months ago and it seemed to produce what you want. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation

        M Offline
        M Offline
        Manish K Agarwal
        wrote on last edited by
        #3

        Thank you James Sonork ID 100:25668

        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