Skip to content

gokhanjs/nextjs-localization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-localization

A side-by-side reference for integrating next-intl with the Next.js App Router, comparing two routing strategies in working demos.

If you've ever opened the next-intl docs and wondered "do I actually need locale-based routing for my app?" — this repo answers that question with two runnable projects you can clone, diff, and copy from.

What's inside

Folder Strategy When to use
with-locale-based-routing/ URL contains the locale (/en/..., /tr/...) SEO-driven sites, public marketing pages, multi-region apps
without-locale-based-routing/ Locale resolved from headers/cookies, no URL prefix Internal tools, dashboards, single-region apps

Both demos use the same translations and components — the only difference is the routing setup, so you can diff them and pick the strategy that fits your app.

Stack

  • Next.js (App Router)
  • next-intl
  • JavaScript / JSX

Quick start

git clone https://github.com/gokhanjs/nextjs-localization.git
cd nextjs-localization

# Pick a demo
cd with-locale-based-routing       # or without-locale-based-routing
npm install
npm run dev

Open http://localhost:3000 and switch languages from the UI.

Live demos

Why this exists

Most i18n examples online either show a trivial single-page setup or jump straight into edge cases without explaining the routing decision. This repo isolates that decision into two clean, runnable references.

License

MIT

About

next-intl + Next.js App Router starter — two routing strategies (with/without locale-based routing) compared side-by-side

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors