Last post Mar 04, 2010 07:36 AM by Rouchie
Mar 03, 2010 11:47 AM|Rouchie|LINK
I am in the process of translating a massive web application from English into Norwegian. I am using RESX files placed in
App_LocalResources folders, and all is going well so far.
My question relates to pages that contain images. Many images in the application are screen-grabs, and therefore also have localized content. Therefore, now I've managed to get Vista to actually boot up into Norwegian I can do these screen grabs again.
This leaves me with two versions of each image, for example:
myscreengrab01.gif -- English screen grab
myscreengrab01.no.gif -- Norwegian screen grab
Can anyone please advise on the best way to display images based on culture settings? Can I do something as simple as this:
<asp:Image runat="server" ImageUrl="<%$ Resources:imageUrl %>" />
or is there a better way, such as placing the images inside the RESX files?? I have no experience with either approach, so some advice 'from the trenches' would be really good and save me time!
Mar 03, 2010 12:39 PM|Goldnarms|LINK
The best way is to set the ImageUrl in the resource file
And in the markup:
Mar 04, 2010 03:50 AM|Das.Sandeep|LINK
In such scenario we generally give images name smartly like below:
So when you use image name the you no need to use case respective to language specific imagename.
myscreengrab + culturename + ".gif".
Hope you understood, it is easy way to do this even same way you can set classname.
Mar 04, 2010 07:06 AM|Tapan Bhatt|LINK
Please go through below links:
I hope it will solve your problem. Please let me know if you have any query for the same.
Mar 04, 2010 07:36 AM|Rouchie|LINK
Thank you all for your suggestions. Goldnarms, I think the method you mentioned seems as good as any others.
What is the actual benefit of moving the images into the resources files, rather than referencing them by text? Is there actually any benefit?