title: What is the proper way to i18n multipage site, build with webpack?
body: <h1> The task </h1>
  
  <p>To build several static pages for several languages using the same parts. Keep the project as simple and minimal as it's possible.</p>
  
  <h1> Stack </h1>
  
  <p>Webpack with html-loader, HtmlWebpackPlugin, and I18nPlugin. Nothing fancy. Everything is in latest versions for today. </p>
  
  <h1> Current solution </h1>
  
  <p>webpack.config.js:</p>
  
  <pre><code>const entryHtmlPlugins = (language) =&gt; pageList
      .map(function (entryName) {
          const langPart = language === defaultLanguage ? '' : `${language}.`;
  
          return new HtmlWebpackPlugin({
              filename: `../dist/${langPart}${entryName}`,
              template: `prerender/${entryName}`,
              language,
          });
      });
  
  module.exports = Object.keys(languages).map((language) =&gt; ({
      ...
      module: {
          rules: [{
              test: /\.(html)$/,
                  include: path.join(__dirname, 'src/pages'),
                  use: {
                       loader: 'html-loader',
                       options: {
                           interpolate: true
                       }
                  }
           },
      ...]
      },
      plugins: [
          ...
          new I18nPlugin(languages[language]),
      ].concat(entryHtmlPlugins(language))
  }))
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;!-- regular html with translations in format: --&gt;
  &lt;%= __('Test') %&gt;
  
  </code></pre>
  
  <h1>Problem</h1>
  
  <p>In templates, imported with </p>
  
  <pre><code>&lt;%= require('html-loader!./partial.html') %&gt;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>${require('!html-loader!./partial.html')}
  </code></pre>
  
  <p>translations aren't working.</p>
  
  <h1>Solutions?</h1>
  
  <p>Processing of the HTML pages with the plugin from temp folder (so every page is built once for including partials and once more for translation) is working but cause infinite rerendering. And doesn't feel right. 
  <br/>The task looks so simple and I hardly believe there is no other way than to use a template engine.
  I wonder if this is the right thought direction to make a custom plugin?
  If the current stack is too modest for my purpose, could you please suggest any other options. </p>
  
  <h1>Question</h1>
  
  <p>So are there a more or less elegant way to use partials and i18n at the same time or I <strong><em>have</em></strong> to use pug (or something) for templating? </p>