使用内部标记本地化字符串

I have the following sting that I need to localize for translation

<?php echo 'Click <a href="'. esc_url( get_permalink() ) . '">here</a> to go and wacth the video.' ?>

My problem is the <a href="'. esc_url( get_permalink() ) . '">here</a> part in the middle of the sentence. I did try to break it up like this

<?php printf(__('Click %s to go and wacth the video.', 'pietergoosen'), '<a href="'. esc_url( get_permalink() ) . '">here</a>'); ?>

This works, but the word here inside the <a> tag then can't be translated.

Any suggestions how this can be solved

You can split the tag into two separate strings:

printf(__('Click %shere%s to go and wacth the video.', 'pietergoosen'), '<a href="'. esc_url( get_permalink() ) . '">', '</a>');