Question: Localizing Images in Visual Studio 2005 RRS feed

  • Question

  • User-1654307313 posted

    I've created a website that is available in both english and italian.

    I've gotten the page translated and the text portion works fine.

    However, I have a couple images that needed to be translated because they contained some text so I have an english version of the image and an italian version of the image.

    How do I go about localizing these images and displaying it on my page based on the browser default language?

    I went into my english resource file, then instead of the "strings" view, I went to" images" and simply dragged the english version of the image into this window. I did the same in my italian resource file except I dragged the italian image over.

    My question is this... how do I call the image into my .aspx page?


    Friday, May 19, 2006 10:58 AM

All replies

  • User83354550 posted

    Hi, the quickest and easiest way to do this is to actualy store the images as Global Resources, not local. Take the following action:

    • Create a global resource file as you have local ones, in a global resource folder.
    • Enter the files and type an identifying string such as "HeaderLogo"
    • In the next column enter the url of the image (i.e. I have all project images in my project within a folder called "IMG")
    • Do the same for the other language.
    • Go to your aspx page
    • Place some image tags on your page where you wish to display.
    • For each image, go into its properties and click on "Expressions".
    • A box will appear for your image
    • Find the 'Navigate URL' option
    • Set the 'ClassKey' to the name of your resource file (just the text, no file extension or text you have specified a language with E.G page: resource.hi-IN.resx become resource).
    • For the resource key, this will be the entry text you placed in the resource file ("HeaderLogo")

    Thats it, done. Let me know if it works.


    Thursday, February 8, 2007 9:08 AM
  • User83354550 posted

    I ment 'Image URL' not 'Navigate URL'


    Thursday, February 8, 2007 9:09 AM