I have a site with French and English dimensions. For example, I have an image with the dimensions 36 x 46.5 cm. Since it's French, the dot (".") should be a comma (",").
The structure:
<div class="wrapper">
<span class="custom-field">46.5</span>
</div>
My code:
<script>
var period = document.getElementsByClassName("custom-field");
var comma = period.replace(".",",");
document.getElementsByClassName("custom-field").innerHTML = comma
</script>
The console tells me that period.replace(".",",") is not a function. Please help and thanks in advance.