Is there a built in function of JavaScript to convert a string into a particular locale (Euro in my case)?
E.g. 50.00 should get converted to 50,0
The accepted answer from Matt Ball is wrong - dunno why nobody haven't noticed. There is no such function as String.toLocaleString() [ref]! Therefore when Number.toFixed() returns String, the consequent toLocaleString() does nothing. So you won't get localized number, just the product of toFixed() function.
WRONG (don't do it like this):
var i = 1234.123;
alert(i.toFixed(2).toLocaleString() + ' €'); // ALWAYS alerts '1234.12 €' (no locale formatting)
Suggestion how to do it right:
You may use jQuery plugin like NumberFormatter.