Last post Jul 21, 2011 07:39 AM by shree_ars
Jun 20, 2011 05:34 AM|shree_ars|LINK
How to map the imageurl of imagebutton,images... etc from localization resx file.
Is it possible to map the image file outside of app_localresource folder from resx file.
i am getting all text from localization resx file. but i cant able to map the imageurl from resx file.
i included the image in resx file. how to give value for it in resx file(imageurl)
help me plzz. thanks alot
Jun 20, 2011 05:39 AM|shashankgwl|LINK
as far as i understand , there should be one resx per language, so put the imageurl in those resx files. Like french.jpeg in page.fr-Fr.resx and so on , now based on the localization settings appropriate resx will be loaded and based on that appropriate
image url can show desired image.
Jun 20, 2011 05:49 AM|shree_ars|LINK
yes i done like that only
i added one image "globalization_en.jpg" for .resx file.
but on output the image is not showing
Jun 20, 2011 06:26 AM|shashankgwl|LINK
That can also be a path issue, see what the html source says about the image path, and see if the image exists on that path.
Jun 21, 2011 03:01 AM|shree_ars|LINK
i added the image in .resx file and created one property in .resx as
value = imagename
but the image control doesnt show the image. instead of that it showing the alternate text for it.
Jun 21, 2011 05:36 AM|shashankgwl|LINK
1. Is meta:Resourcekey present on your <asp:Image control.
2. is alternate text also coming from resx, that makes sure that localization is being applied properly and the issue is in path ,
3. just to ensure that it is a path issue , put the ImageUrl value as any image's url from internet (go to google, search any image, put its url in resx.) if that image appears on the page then it means it is a path issue.
Jun 21, 2011 06:22 AM|shree_ars|LINK
1) yes meta tag is present on the control
2)yes alternate text is also from resx
3) i tested by putting the image outside of .resx file(outside of App_localresources and App_Globalresources) then i added corresponding url in resx. its mapping.
but i kept image inside .resx file and mapping to it. the image is not coming
Jun 21, 2011 07:41 AM|shashankgwl|LINK
it should be a path issue, give path from root if not given.
Jun 21, 2011 08:33 AM|shree_ars|LINK
I added image in .resx file.
and in .resx file i added one property as below
Name : imgCultureResource1.ImageUrl
Value : Images/globalization.jpg
where "imgCultureResource1" is the image control meta key.
i also tried by changeing the Value as follows
but nothing is mapping to image control
Jun 21, 2011 09:08 AM|shashankgwl|LINK
do the view source of the page and see what does the src property of img tag reads like.
Jun 21, 2011 09:09 AM|jrlopezp|LINK
Jun 22, 2011 02:04 AM|shree_ars|LINK
what ever the value which is given in .resx file, that only stored in the source of image control.
Jul 01, 2011 12:15 AM|shree_ars|LINK
the image source is same as that.. what i am mentioned in .resx file.
Jul 11, 2011 01:15 AM|shree_ars|LINK
the src property in the view source is same as what ever we stored in .resx file value
Jul 21, 2011 07:39 AM|shree_ars|LINK
The localization of the image control is possible only by keeping the images outside the App_LocalResource or App_GlobalResource folder
if u need to map dynamically at runtime by .resx file itself.
If u keep inside the App_LocalResource or App_GlobalResource than the images should be mapped by codeing refereing the images names to default culture