title: Translating the alert messages by using i18 translation library
body: <p>I wrote a code that will translate text from <code>en-US</code> to <code>id-ID</code> (Indonesian). Here button has got a text which reads as <code>Click me if you are serious</code>. After applying translation, it is getting translated as <code>Klik saya jika anda serius</code> successfully. If I click on that button, an alert message will be displayed like this: <code>You have been alerted, code it down</code>. I want that alert message to be translated to <code>id-ID</code>. Here is my code:  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;Translation&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;button onclick="alertbox();" id="btn" &gt;Click me if you are serious&lt;/button&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="i18next-1.10.1.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
      function alertbox () {
        alert("You have been alerted, code it down");
      }
      $.i18n.init({
          lng: 'id-ID',
          ns: {
              namespaces: ['ns.common', 'ns.special'],
              defaultNs: 'ns.special'
          },
          useLocalStorage: false,
          debug: true
      }, function(t) {
          $('#btn').text($.t('app.btn', {
              btn: ''
          }))
      });
  
  
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;  
  </code></pre>
  
  <p><code>id-ID (ns.special.json)</code>  </p>
  
  <pre><code>{
      "app": {
          "btn": "Klik saya jika anda serius"
      }
  }  
  </code></pre>
  
  <p><code>en-US (ns.special.json)</code>  </p>
  
  <pre><code>{
      "app": {
          "btn": "Click me if you are serious"
      }
  }  
  </code></pre>
  
  <p>How can I translate alert message into <code>id-ID</code>? </p>