I'm looking for the exact same thing without hacking the core or doing complex things.
What I simply want to do is change #comments for #comentarios (in Spanish) to the comment links. Looks like get_comments_link is the function to change, which is in comment-template.php (in the wp-includes directory, of course). This is it:
/**
* get_comments_link() - Retrieves the link to the current post comments
*
* @since 1.5
*
* @return string The link to the comments
*/
function get_comments_link() {
return get_permalink() . '#comments';
}
As doodlebee points out, defining a new function would work. But, comments_popup_link makes use of comments_link, which is at the same time making use of get_comments_link again. That means, if I change the get_comments_link function to, say, get_comments_link_sp, then I also have to change comments_link to comments_link_sp, and finally, comments_popup_link to comments_popup_link_sp. Changing at least one line in each function.
Like I say, that works, but it means copying and pasting three functions, then changing the code.
That's a nightmare! Seriously, hacking the core would be easier if this is the only route. At least I would save the hassle (and possible errors) of copying and pasting each time the core code changes.
Plus, I think any other plugins or code that would use the 'standard' WordPress code would not work for me. Which means more hacking?
Furthermore, there's other functions to be changed, such as get_comment_link. Again, more pain.
I have found out all of this without any PHP knowledge, but I feel there must be a way to make all of this much simpler.
Any advise or help would be much appreciated.
Cheers!