title: How to insert variable into HTML
body: <p>I'm having a little problem, i have a translations JSON variable.
  And i want to put it on HTML. Is there a way to make it somehow?</p>
  
  <p>My JS file:</p>
  
  <pre><code>var Karting = Karting || {};
  
  Karting = {
  
  lang : 'lv',
  translationsLV: {
      "Home" : "Ziņas",
  },
  }
  </code></pre>
  
  <p>And i want to do this:</p>
  
  <p>My page is static and i'm not using any templating engines.</p>
  
  <pre><code>&lt;li&gt;&lt;a class="active" href="#"&gt;Karting.translationsLV['Home']&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Added this:</p>
  
  <pre><code>$(window).load( function() {
          var translations;
          if (Karting.lang=='lv')
          {
              translations = Karting.translationsLV;
          }
          else
          {
              translations = Karting.translationsENG;
          }
              }, false );
  </code></pre>
  
  <p>This doesn't show my element</p>
  
  <pre><code>document.write(translations['Home'])
  </code></pre>
  
  <p>UncaughtRefferenceError - translations is not defined</p>