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
There are locale related features described within the ECMAScript Internationalization API.
To get the float 50.0 converted to the string 50,00 € (using the 'de-DE' locale) you need to write this:
new Intl.NumberFormat("de-DE", {style: "currency", currency: "EUR"}).format(50.0)
This API is available in all current major browsers.
For more info about the number formatting features of the Internationalization API you should read the article at MDN.