Howdy,
I have a web application which needs to support multiple languages. We currently have quite a lot of images on the site with text in them. Im trying to find a way to localize these images with the least amount of hassle. What i have come up with so far is to add sub folders to the current /Images folder which relate to the required language. So for example /Images contains the default set of images and /Images/es-MX contains the Spanish-Mexican localised images.
All pretty standard so far i think. Now the issue i have is that in order for this new structure to work i need to add the following to all img tags:
<img ... src="/images/<%= GetGlobalResourceObject("MyResource","IMAGEPATH").ToString() %>image1.gif" ../>
Or in the case of asp:ImageButton i need to programmatically set their ImageURL in codebehind with a utility method that replaces the /Images/ with /Images/es-MX or whatever the culture happens to be.
All of this leaves me with messy markup and lots of codebehind calls just to correct the image path. I ask you dear reader, is there a better way?