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. Localization problem with Resource files

Localization problem with Resource files

Scheduled Pinned Locked Moved C#
csharphelpvisual-studioquestionannouncement
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.
  • A Offline
    A Offline
    Ashvin Gunga
    wrote on last edited by
    #1

    I am having problems with the use of resource files (holding strings) with Visual Studio 2005. To abstract the problem, I have written a demo application. I am working on device applications for PPC2003. I got one C# Solution with two projects. The following shows how the files are organised (and the blue text is some comments to understand it better): LocalizationAppDemoAll2 (Solution) _____LocalizationAppDemoAll2 (In bold, my startup project) __________Properties (folder) _______________... __________References (folder) _______________LocalizationAppDemoAll2Presentation (reference to dll of the other project) _______________... __________it (folder) _______________LocalizationAppDemoAll2Presentation.resources.dll (added as a shortcut link) __________Program.cs (containing the Main method) _____LocalizationAppDemoAll2Presentation (the second project within the solution) __________References (folder) _______________... __________Resources (folder) _______________CodeText.it.resx _______________CodeText.resx __________Form1.cs __________FormHandler.cs ---------------------------------------- I have changed my regional settings on the PDA device to Italy, and running the application. The application is supposed to read all the strings from the resource file CodeText and populates it in a list box (or combo box). However, the problem is that when running the application, it is only using the english version (i.e. CodeText.resx) file and not the italian resource file (i.e. CodeText.it.resx) despite the regional settings changed to Italy. I think it cannot find or reads the correct dlls. Any help please? It's urgent. Thanks Ashvin Gunga Ashvin Gunga

    S 1 Reply Last reply
    0
    • A Ashvin Gunga

      I am having problems with the use of resource files (holding strings) with Visual Studio 2005. To abstract the problem, I have written a demo application. I am working on device applications for PPC2003. I got one C# Solution with two projects. The following shows how the files are organised (and the blue text is some comments to understand it better): LocalizationAppDemoAll2 (Solution) _____LocalizationAppDemoAll2 (In bold, my startup project) __________Properties (folder) _______________... __________References (folder) _______________LocalizationAppDemoAll2Presentation (reference to dll of the other project) _______________... __________it (folder) _______________LocalizationAppDemoAll2Presentation.resources.dll (added as a shortcut link) __________Program.cs (containing the Main method) _____LocalizationAppDemoAll2Presentation (the second project within the solution) __________References (folder) _______________... __________Resources (folder) _______________CodeText.it.resx _______________CodeText.resx __________Form1.cs __________FormHandler.cs ---------------------------------------- I have changed my regional settings on the PDA device to Italy, and running the application. The application is supposed to read all the strings from the resource file CodeText and populates it in a list box (or combo box). However, the problem is that when running the application, it is only using the english version (i.e. CodeText.resx) file and not the italian resource file (i.e. CodeText.it.resx) despite the regional settings changed to Italy. I think it cannot find or reads the correct dlls. Any help please? It's urgent. Thanks Ashvin Gunga Ashvin Gunga

      S Offline
      S Offline
      sam
      wrote on last edited by
      #2

      use following code for explicitly loading resx File System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it");

      A 1 Reply Last reply
      0
      • S sam

        use following code for explicitly loading resx File System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("it");

        A Offline
        A Offline
        Ashvin Gunga
        wrote on last edited by
        #3

        Thanks Sam. I figured out the problem. The code was fine. It's one of the properties of the dll link that I didnt set correctly. Now it's working. Cheers

        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