title: Can I generate i18n JSON files for Svelte app using Rollup?
body: <p>I have a Svelte Rollup JS app. I have implemented my own i18n. I have <code>en-us/[function].json</code> and <code>de-de/[function].json</code>. I <code>fetch</code> the <code>JSON</code> at runtime and display the text. </p>
  
  <p><em>en-us/login.json</em></p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "username": {
      "label": "Username"
    }
  }
  </code></pre>
  
  <p><em>de-de/login.json</em></p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "username": {
      "label": "Nutzername"
    }
  }
  </code></pre>
  
  <p>Functions like login and sign up have common texts. In the above example, the <code>username</code> field is used in both the screens/functions. If I have to make a change to the text, I will have to change all the <code>[function].json</code> files in all language folders. In this case, if I change the <code>username.label</code>, I will have to change in 4 files <code>en-us/login.json</code>, <code>en-us/signup.json</code>, <code>de-de/login.json</code>, <code>de-de/signup.json</code>.</p>
  
  <p>Is there a better way to handle it? Can I generate these JSON files using Rollup?</p>