This also assumes constants of
exports.defaultLocale = "en";
exports.supportedLanguages = ["en"];
translatedLocales
coming from createI18nPages.js
is important, and needs behavior for how to display missing translations in the frontend as well. It's how we know what other pages exist so we can put them in the sitemap as alternates (which was kind of a pain, had to totally take over output from the plugin) as well as listing them in <head>
as <link rel="alternate">
tags
createI18nPages
is where the real page generation happens. The gist is, make a primary page, then make /:locale/:url
pages for all available translations. each page needs an array of translations, and reqs were to show the default translation if none was available