Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization with NextJS and Github Pages #1

Open
skjelmo opened this issue Jul 13, 2021 · 0 comments
Open

Localization with NextJS and Github Pages #1

skjelmo opened this issue Jul 13, 2021 · 0 comments

Comments

@skjelmo
Copy link
Collaborator

skjelmo commented Jul 13, 2021

Goal:

  • Serve content on kodeworks.no in Norwegian and English

Preferred solution:

  • Sub-path routing (/en/..) without sub-path for default locale (norwegian) (/..)

Problem description:

Chosen solution at the time of writing

  • Focus on the Norwegian content only
  • When english is required, add duplicate page components for the english URLs, and investigate how to minimize duplication e.g. by sharing page components that accepts language as input using an i18n-package for translation

Possible solutions

Create a page component for each language

  • Duplicate code for all pages

hosting with node.js server

Deploying with CLI should support multiple users without exceeding free tier. However, the pricing plan limits the number of users who have access to the hosting dashboard.

Vercel

Cons:

  • Only one user has access to the hosting dashboard vercel.com

Layer0

Netlify

Sub-path routing for all locales

  • Example with react-i18next
  • A solution using Sanity CMS will most probably also create sub-path for default locale, introduce complexity and increase cost more than three users need access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant