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. localizing bitmaps

localizing bitmaps

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpvisual-studiographicstoolstutorial
2 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.
  • K Offline
    K Offline
    klawipo
    wrote on last edited by
    #1

    Hi, I'm currently trying to localize a .Net project. that means I need to use localized resources like stringtables and Bitmaps for german and english. Following a localization sample delivered by VS, I succeessfully localized string-resources using the resgen and afterwards the assemblylinker(al.exe) tools. Unfortunately, using the al-tool to localize bitmaps failed. Does anyone have ideas or examples with which parameters to call the al.exe to use localized Bitmaps and how to use the bitmap-resource via GetManifestResourceStream() or something? Thanks, klawipo

    H 1 Reply Last reply
    0
    • K klawipo

      Hi, I'm currently trying to localize a .Net project. that means I need to use localized resources like stringtables and Bitmaps for german and english. Following a localization sample delivered by VS, I succeessfully localized string-resources using the resgen and afterwards the assemblylinker(al.exe) tools. Unfortunately, using the al-tool to localize bitmaps failed. Does anyone have ideas or examples with which parameters to call the al.exe to use localized Bitmaps and how to use the bitmap-resource via GetManifestResourceStream() or something? Thanks, klawipo

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      The easiest way is to persist the images in ResX files (typically encoded in base64 - just set a BackgroundImage for a control and look at the form's/user control's .resx file "under" the file is you show all files in your project for an example). This allows you to use the ResourceManager which already takes care of the satellite assemblies for you; otherwise, you can use Assembly.GetSatelliteAssembly (calling it on an Assembly reference that is the primary assembly using the same assembly name but a different culture) and then call GetManifestResourceStream from that. If your primary assembly (the one with IL modules in it - the code that is executing) contains that culture (if you use the assembly-level NeutralResourcesLanguageAttribute) or if no satellite assembly is found, and exception will be thrown so then grab the resource out of the primary assembly.

      Microsoft MVP, Visual C# My Articles

      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