I want to convert every number in the html content to Persian numerals without other effects on page elements.
For example:
<div style='color: #c2c2c2'>
text number 1
<span>text number 2</span>
<div>
text number 3
<b>text number 4</b>
<a href='#page2'>text number 5</a>
</div>
</div>
be converted to:
<div style='color: #c2c2c2'>
text number ۱
<span>text number ۲</span>
<div>
text number ۳
<b>text number ۴</b>
<a href='#page2'>text number ۵</a>
</div>
</div>
let persian = array('۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹');
let english = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
Thanks.