Localize html attributes in templates/functions

Topics: General, XSLT
Apr 24, 2012 at 9:57 AM

Hi

I have a function for rendering employees. Each employee item renders a link on wich I would like to use a localized title attribute. I have created one .resx file for each language for this but I can't figure out how to use the translated string in an attribut. All I can find is the

<lang:string key="Resource, Resources.FileName.String1" />

tag but this does not really help me in this case. I have also tried the <a title="${Resource, Resources.FileName.String1}" href="#">Link text</a> syntax but this just gives me an error. Anyone has any idea how to use the translation function in an attribute?

Thanks!


Coordinator
Apr 24, 2012 at 11:32 AM

Hello,

Try out this:

<a href="#">
<xsl:attribute name="title">
	<lang:string key="Resource, Resources.FileName.String1" />
</xsl:attribute>
</a>

Apr 24, 2012 at 5:50 PM

Of course!

Thank you :)