Use string.substitute instead of lang.replace