Json and translation
<p>I have a <code>json</code> document where <em>some</em> of the strings must be translated. For example (made-up syntax), my <code>data.json</code>:</p>

<pre><code>{
  "greeting": "trans:Hello"
}
</code></pre>

<p>In this case the string <code>"Hello"</code> is marked as translatable with the prefix <code>trans:</code> (which does not seem very robust). I would then use a tool to generate a catalog:</p>

<pre><code>xgettext data.json
</code></pre>

<p>And then translate the strings to my target languages. My application will then use my original json and the translations mapping:</p>

<pre><code>translations = {
  "en" : {
    "Hello": "Hello"
  },
  "es" : {
    "Hello": "Hola"
  }
}
</code></pre>

<p>And would generate the final json (for target language <code>es</code>):</p>

<pre><code>{
  "greeting": "Hola"
}
</code></pre>

<p>Is there any standard way of specifying translatable strings in json, so that they can be processed by standard tools to generate message catalogs?</p>