I'm setting up a static website which I want to display in two languages.
I can't find a comprehensive overview of the different options (e.g. server-side loading vs front-end loading vs using different folders. What are the advantages of each option (e.g. for SEO, maintainability, scalability etc.)?
Ideally the translations will be stored in separate json files. The main thing I care about is translation - less so the other aspects of i18n and l10n.
For example how might I translate:
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Welcome</h1>
<p>Here's a website</p>
<p>Here's a <a href="https://www.google.com/">Link</a> to language specific Google</p>
<button>Click here</button>
</body>
</html>
Some of the many options I've encountered so far:
- i18next - most standard option. support for loads of frameworks, but not clear which one is appropriate for most basic usage. i18nextify? jquery-i18next?
- i18js - simple, but for rails?
- i18n - most popular on npm, but has build status
- i18n-2 - updated version of above
I feel like i18next is the most standard way to go, but is it suited to a simple site?
node-polyglot
i18n is nice, yes. – Melodramatic