2efc944cb9
## `with-next-translate` Example Refactor - [x] Linting passes ## Purpose for changes - The existing locals folder is using a redundant string structure which continuously repeats "Change language to " in separate instances in separate languages alongside separate language translations. - This PR is a simple refactor to extract "change language to" to it's own string, and references already existing strings defining the language translation. ## Why they might be helpful - A user looking to implement this pattern should consider reducing redundancies as early as possible to scale an app, thus I believe it would be helpful for this example. Notes: - these original translations were done via google translate - verified that these strings still make sense and translate properly in every locale / language - these strings are meant to be examples, translations have not been verified with a translation agency. Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com> |
||
---|---|---|
.. | ||
components | ||
locales | ||
pages | ||
public | ||
.gitignore | ||
i18n.json | ||
next.config.js | ||
package.json | ||
README.md |
next-translate example
This is an example of using next-translate in a Next.js project.
Preview
Preview the example live on StackBlitz:
Deploy your own
Deploy the example using Vercel:
How to use
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-next-translate with-next-translate-app
# or
yarn create next-app --example with-next-translate with-next-translate-app
Deploy it to the cloud with Vercel (Documentation).
Notes
This example is a basic starting point for using next-translate with Next.js. It's a tool to translate Next.js applications respecting the Automatic Static Optimization. Deploy static sites with full i18n support!