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 File

Resource File

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

    Hei, For multilingual application we have to use a new separate resource file for each form. So in this way we cannot reuse our translation that we have done in any other form. My question: Is there any way by with we can use a single global language resource file at all forms? In this way we may be able to resue our translations. Thanks

    Syed Shahid Hussain

    T B 2 Replies Last reply
    0
    • S Syed Shahid Hussain

      Hei, For multilingual application we have to use a new separate resource file for each form. So in this way we cannot reuse our translation that we have done in any other form. My question: Is there any way by with we can use a single global language resource file at all forms? In this way we may be able to resue our translations. Thanks

      Syed Shahid Hussain

      T Offline
      T Offline
      Tony Richards
      wrote on last edited by
      #2

      Why not bind to the default resource file instead and then localize that?

      S 1 Reply Last reply
      0
      • T Tony Richards

        Why not bind to the default resource file instead and then localize that?

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

        because it repeats the translation...

        Syed Shahid Hussain

        1 Reply Last reply
        0
        • S Syed Shahid Hussain

          Hei, For multilingual application we have to use a new separate resource file for each form. So in this way we cannot reuse our translation that we have done in any other form. My question: Is there any way by with we can use a single global language resource file at all forms? In this way we may be able to resue our translations. Thanks

          Syed Shahid Hussain

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

          I don't understand exactly what you mean. Is it that you want to have one single big resource file for all your forms instead of one file per form, so that you can re-use e.g. the translation of the OK and Cancel buttons in many places? Well, it is possible. But then you must do a lot of the assignment of the localized text manually, something like label1.Text = ResourceManager.GetString("Form1_label1_Text"); That can be automated, with automatically generated resource names. But if it is the translation which you want to re-use, that automatization won't help. You could extend all text containing elements with an extra property holding the resource name (thus allowing you to re-use the resource), but that will also take a lot of manual work before. Then you could get to some label1.Text = ResourceManager.GetString(label1.ResourceName); which can be easily made more generic, with enumerating all components on a form etc.

          S 1 Reply Last reply
          0
          • B Bernhard Hiller

            I don't understand exactly what you mean. Is it that you want to have one single big resource file for all your forms instead of one file per form, so that you can re-use e.g. the translation of the OK and Cancel buttons in many places? Well, it is possible. But then you must do a lot of the assignment of the localized text manually, something like label1.Text = ResourceManager.GetString("Form1_label1_Text"); That can be automated, with automatically generated resource names. But if it is the translation which you want to re-use, that automatization won't help. You could extend all text containing elements with an extra property holding the resource name (thus allowing you to re-use the resource), but that will also take a lot of manual work before. Then you could get to some label1.Text = ResourceManager.GetString(label1.ResourceName); which can be easily made more generic, with enumerating all components on a form etc.

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

            Thanks but i think in this way i'll wast much time. So the auto process thaat is waht i'm doing is fine i think....!!! Thanks after all...

            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