title: How to use Android xliff:g
body: <p>Can someone please explain the <code>xliff:g</code> for strings/localization.</p>
  
  <p>I understand that <code>xliff:g</code> is not supposed to translate anything inside the <code>&lt;&gt;</code> things, but I'm confused how exactly I'd use this in code. </p>
  
  <p>An example I have in my case is the practice spanish translations that I have has:</p>
  
  <pre><code>&lt;string name="order_quantity"&gt;Cantidad: &lt;xliff:g id="quantity" example="2"&gt;%d/xliff:g&lt;/string&gt;
  </code></pre>
  
  <p>I am now trying to get localized strings with <code>xliff:g</code> to work.
  What is <code>id</code> here and what does it do? And what does it call?</p>
  
  <p>Also what is the <code>%d</code> and what does it do? What is the point of <code>example</code>? Also, how would I call that into code, if at all?</p>
  
  <p>Why can't someone just do the following code to insert the following xml:</p>
  
  <pre><code>&lt;string name="quant"&gt;Quantity: &lt;/string&gt;
  </code></pre>
  
  <p>into java like so:</p>
  
  <pre><code>getString(R.string.quant) + quantity
  </code></pre>
  
  <p>so that way it concactenates the quantity variable into the <code>getString</code>?</p>