https://github.com/tomsoderlund/nextjs-multi-domain-locale Skip to content Sign up Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up Sign up {{ message }} tomsoderlund / nextjs-multi-domain-locale * Notifications * Star 67 * Fork 0 Hosting multiple domains on the same Next.js site (while maintaining multiple languages and SSG) multi-domain-locale1.vercel.app/ View license 67 stars 0 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights main Switch branches/tags [ ] Branches Tags Nothing to show {{ refName }} default View all branches Nothing to show {{ refName }} default View all tags 1 branch 0 tags Go to file Code Clone HTTPS GitHub CLI [https://github.com/t] Use Git or checkout with SVN using the web URL. [gh repo clone tomsod] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio If nothing happens, download the GitHub extension for Visual Studio and try again. Go back Latest commit @tomsoderlund tomsoderlund Readme: auto language detection ... 1 666e990 Apr 10, 2021 Readme: auto language detection 666e990 1 Git stats * 25 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time pages Colors for site/locale Apr 9, 2021 public Initial commit from Create Next App Apr 9, 2021 styles Colors for site/locale Apr 9, 2021 .gitignore Initial commit from Create Next App Apr 9, 2021 LICENSE.md License etc Apr 9, 2021 README.md Readme: auto language detection Apr 10, 2021 next.config.js Translate to Swedish Apr 9, 2021 package.json Package fix Apr 9, 2021 yarn.lock Webpack 5 and Standard.js Apr 9, 2021 View code nextjs-multi-domain-locale Demo Concept README.md nextjs-multi-domain-locale Multiple domains and languages on the same Next.js site This is an example of hosting multiple domains on the same Next.js site (while maintaining multiple languages and static site generation (SSG)), using Next.js' i18n system. Demo https://multi-domain-locale1.vercel.app/ Concept * Next.js' i18n locale is used to determine the site. * Selecting a language is instead handled via a pseudoLocale prop (pages in a /[pseudoLocale] folder). * A redirect from / to /en. * TODO: Automatic language detection using the Accept-Language header. See next.config.js for setup. About Hosting multiple domains on the same Next.js site (while maintaining multiple languages and SSG) multi-domain-locale1.vercel.app/ Topics i18n nextjs domains ssg Resources Readme License View license Releases No releases published Packages 0 No packages published Languages * JavaScript 66.2% * CSS 33.8% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.