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. .NET (Core and Framework)
  4. Change UserStrings in code

Change UserStrings in code

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharptutorialquestion
5 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.
  • C Offline
    C Offline
    cecildt
    wrote on last edited by
    #1

    Hi Does any one know how to change the UserStrings Values in the .Net Metadata in code?

    T 1 Reply Last reply
    0
    • C cecildt

      Hi Does any one know how to change the UserStrings Values in the .Net Metadata in code?

      T Offline
      T Offline
      TheGreatAndPowerfulOz
      wrote on last edited by
      #2

      huh? explain what you're trying to do please.

      C 1 Reply Last reply
      0
      • T TheGreatAndPowerfulOz

        huh? explain what you're trying to do please.

        C Offline
        C Offline
        cecildt
        wrote on last edited by
        #3

        Thanks for th reply. Firstly I created resourcestrings in Delphi for .Net to keep Strings seperate in the assembly that is available to change with a resource editor. These strings are saved in the .Net Metadata in the assembly under UserStrings. I need to change these values inside the app, not with a external resource editor. Delphi for .Net Code resourcestring StrPlay = 'Lets play' C# code const string StrPlay = 'Lets play' This whole thing is to change the whole app between different languages on the fly. Form changes work 100% on the fly. The problem is the strings that is hard coded in the source files that needs to change between different languages. Hope this explain it better. I can explain in futher detail. Any code examples in any language will help. Thanks for helping!

        T 1 Reply Last reply
        0
        • C cecildt

          Thanks for th reply. Firstly I created resourcestrings in Delphi for .Net to keep Strings seperate in the assembly that is available to change with a resource editor. These strings are saved in the .Net Metadata in the assembly under UserStrings. I need to change these values inside the app, not with a external resource editor. Delphi for .Net Code resourcestring StrPlay = 'Lets play' C# code const string StrPlay = 'Lets play' This whole thing is to change the whole app between different languages on the fly. Form changes work 100% on the fly. The problem is the strings that is hard coded in the source files that needs to change between different languages. Hope this explain it better. I can explain in futher detail. Any code examples in any language will help. Thanks for helping!

          T Offline
          T Offline
          TheGreatAndPowerfulOz
          wrote on last edited by
          #4

          1. you should never hard code strings in the source files if you want to be able to easily do localization and internationalization. 2. create a separate resourcestrings assembly file for each separate language, named appropriately (typically using the standard 2-letter designation for each language). the naming convention is usually something like: .en.dll for english .de.dll for german and so on where is some resonable name 3. unload the current resource string assembly and load the one for the desired language does this help?

          C 1 Reply Last reply
          0
          • T TheGreatAndPowerfulOz

            1. you should never hard code strings in the source files if you want to be able to easily do localization and internationalization. 2. create a separate resourcestrings assembly file for each separate language, named appropriately (typically using the standard 2-letter designation for each language). the naming convention is usually something like: .en.dll for english .de.dll for german and so on where is some resonable name 3. unload the current resource string assembly and load the one for the desired language does this help?

            C Offline
            C Offline
            cecildt
            wrote on last edited by
            #5

            Thanks. Can you give me some example code that shows how to load and unload the resourcestrings dynamically in a app. I read that resourcestrings load only at app start up according to locale and that you cannot change the resourcestrings dynamically.

            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