Link translation for custom block
To do this for custom blocks, you will need to enable translations for blocks and custom blocks in the settings.  Then you will need to create translations (with the correct links) for each language.

Details:


Go to /admin/config/regional/content-language
Make sure custom blocks is selected at the top.
Save
Scroll down to Custom Block section
Make sure the basic block and at least the title and body fields are translatable.


To Edit the block.


Go to the Custom Block library
The Edit drop down should have a translate option
Select this and in the translate screen, create a translation.
Edit for the needed language.


Result is that if you are looking at a page for lang X and there is a lang X block translation.  You will see this block.