Link translation for custom block I'm here



I need to create a link to three languages. for example

&lt;div class="link"&gt;
  &lt;div class="1_link"&gt;
    &lt;a href="/en/link/1"&gt; Link 1 &lt;/a&gt;  
  &lt;/div&gt;
  &lt;div class="2_link"&gt;
    &lt;a href="/en/link/1"&gt; Link 2 &lt;/a&gt;    
  &lt;/div&gt;
  &lt;div class="3_link"&gt;
    &lt;a href="/en/link/1"&gt; Link 3&lt;/a&gt;  
  &lt;/div&gt;
&lt;/div&gt;


other in Spanish

&lt;div class="link"&gt;
  &lt;div class="1_link"&gt;
    &lt;a href="/pt-br/link/1"&gt; Link 1 &lt;/a&gt;  
  &lt;/div&gt;
  &lt;div class="2_link"&gt;
    &lt;a href="/pt-br/link/1"&gt; Link 2 &lt;/a&gt;    
  &lt;/div&gt;
  &lt;div class="3_link"&gt;
    &lt;a href="/pt-br/link/1"&gt; Link 3&lt;/a&gt;  
  &lt;/div&gt;
&lt;/div&gt;


In Portuguez

&lt;div class="link"&gt;
      &lt;div class="1_link"&gt;
        &lt;a href="/pt-br/link/1"&gt; Link 1 &lt;/a&gt;  
      &lt;/div&gt;
      &lt;div class="2_link"&gt;
        &lt;a href="/pt-br/link/1"&gt; Link 2 &lt;/a&gt;    
      &lt;/div&gt;
      &lt;div class="3_link"&gt;
        &lt;a href="/pt-br/link/1"&gt; Link 3&lt;/a&gt;  
      &lt;/div&gt;
    &lt;/div&gt;


When I go to the block to see its links, by default it always appears / link / 1 no matter what language I am in.

It does not take in language: it ES or EN o PT-BR

Link 1 --> hover url = http://url_site/link/1 
in any language.

should be

Link 1 --> hover url = http://url_site/en/link/1 
OR
Link 1 --> hover url = http://url_site/es/link/1 
Link 1 --> hover url = http://url_site/pt-br/link/1 



configuration of my 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.