Hah good one – it’s seeing April inside Aprile and changing it to Aprile therefore the word keeps growing in size…
To remedy this, alter your replace to the following which will ensure it matches a whole word only (puncuation or space before/after the word):
jQuery(‘a,time’).replaceText(/\bApril\b/ig, “Aprile”);
The \b means ‘word boundary’ so putting that before and after the word you are searching for ensures it only matches whole words and not part of a word.
Thanks Dave, that nailed it. I’ve added that adjustment to my previous post which contains my hard coded Italian footer thus far. Excellent product and service!
Please login or Register to submit your answer