The plan is to use Accept-Language + Netlify's rewrite rules. https://www.netlify.com/docs/redirects/#geoip-and-language-based-redirects. It says 'redirect' here, but if you use 200 as the status code, it'll rewrite rather than redirect.
You can also set an nf_lang cookie, so we have a path to a language picker.
The idea is just to do multiple builds of the site.
import { strTryAgain, strMedium, strEasy } from ':lang:';
Where Rollup will make :lang: an import like:
export const strTryAgain = 'Try again';
export const strMedium = 'Medium';
export const strEasy = 'Easy';
And it'll just do a build per language pack.
We need to make sure we set Vary headers on all content.
We need to avoid the subsetted font trick for non-English (unless we do similar subsetting).
We probably need to rethink the font all together for non-latin script.
The plan is to use
Accept-Language+ Netlify's rewrite rules. https://www.netlify.com/docs/redirects/#geoip-and-language-based-redirects. It says 'redirect' here, but if you use 200 as the status code, it'll rewrite rather than redirect.You can also set an
nf_langcookie, so we have a path to a language picker.The idea is just to do multiple builds of the site.
Where Rollup will make
:lang:an import like:And it'll just do a build per language pack.
We need to make sure we set
Varyheaders on all content.We need to avoid the subsetted font trick for non-English (unless we do similar subsetting).
We probably need to rethink the font all together for non-latin script.