Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 23, 2009 05:27 PM by nishanthnair
Feb 23, 2009 04:49 PM|LINK
Can anyone help me out with localizing some links in my site? I have localized much content in my site to serve two languages, but i'm stuck at localizing some links. Here's my scenario..I have an aspx page in VB which can be displayed in two languages by
clicking a control to interchange locale, and pull text from resource files. On this page there is a link to a pdf, I have two pdf's for the two languages. How can open the english pdf when the locale is set to english, and the greek pdf when the locale is
set to greek? the pdf's url is in href, and i've tried localizing the href tag to no avail.
Feb 23, 2009 05:27 PM|LINK
here is what i did in the same situation.
I createed 2 folders en-US and en-GB for the 2 locales and added the associated PDF files to these folders. now I dynamically created the URLs to access these PDFs by appending the folder names in the url.
"http://hostname/" + Thread.CurrentThread.CurrentCulture.Name + "pdffile.pdf";
culture is directly taken from current culture. if u add runat="server" in the <a> tag, you can access the anchor tag in code behind and set this url dynamically depending on the language.