Translate Euro Sign(€) in 'EUR'

M

Marco W

Hi,

<xsl:value-of select="translate(current(),'€','EUR')" />

only replace the euro sign with 'E' and not 'EUR'. How can I replace
the euro sign in the string 'EUR'?
 
D

David Carlisle

translate only does single character translations.

xpath 2 has a replace() function, but for xslt2 you need to use
substring-before and substring-after to split up the string before and
after the euro sign and insert EUR.

Or there are several replace templates in faq and archive lists

xsl faq has

http://www.dpawson.co.uk/xsl/sect2/replace.html

for example.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top