How do I show a translated the value of a content type in my template I have a bootstrap banner (jumbotron) on my site, which roughly looks like this: 

&lt;!-- themes\foo\templates\page.html.twig --&gt;
{% if page.banner %}
   &lt;div class="jumbotron" role="banner"&gt;
     &lt;div class="row"&gt;
      &lt;div class="col-md-10 col-md-offset-1"&gt;
        &lt;h1&gt; Welcome to foo.com &lt;/h1&gt; 
      &lt;/div&gt;
    &lt;/div&gt;

     &lt;div class="row"&gt;
      &lt;div class="col-md-10 col-md-offset-1"&gt;
         &lt;h2&gt; we provide &lt;/h2&gt; 
      &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
{% endif %}


Now, instead of hard-coding the texts for h1 and h2 ... I went to  Administration &gt; structure &gt; content type and created content type called short texts and then to Administration &gt; Structure &gt; Content types
and added a content called site slogan and site description they both contain the values of h1 and h2. 

Now, my question is how do I replace the text inside the H tags with a (translatable) text I created as a content? 

This is my first week in Drupal, so I am a bit lost
You need to render either:


Fields
Variables created in a preprocess hook in mytheme.theme


Example, if you crated a field called Short Text (field_short_text), then in the node template for that type, you do:

{{ content.field_short_text }}

Except from the page template level (page.html.twig) you won't have access to the node render array.

If you create your own variables in a preprocess hook, you will need to call the translation service against that - it is better to let Drupal work normally for simple cases like these.

What you can do in this situation is create a View that has a node id argument, and either:


Output Views fields (meh)
Output that node in a designated view mode (best method)


Generate a Block display from that View, then place the block in the Banner region of your theme from Block Layout in the admin. If you are not familiar with Views, you should get familiar with it right now.

However, if you are trying to print the site slogan and site description, these are set under Admin &gt; Config &gt; Site Information, and should be available already as variables to the page template. I don't think there is a need to recreate what already exists, unless core doesn't translate site name, site slogan, site description but I am pretty sure it does.