---
title: "i18n in Edge Middleware"
description: "This template shows how to redirect users based on i18n configuration."
url: "https://vercel.com/templates/next.js/edge-functions-i18n"
links:
  repository: "https://github.com/vercel/examples/tree/main/edge-middleware/i18n"
  demo: "https://edge-functions-i18n.vercel.app"
  deploy: "https://vercel.com/new/clone?demo-title=i18n+in+Edge+Middleware&demo-description=This+template+shows+how+to+redirect+users+based+on+i18n+configuration.&demo-url=https%3A%2F%2Fedge-functions-i18n.vercel.app&project-name=i18n&repository-name=i18n&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fedge-middleware%2Fi18n&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F5qe90HkWBvQIju5SlgW8ey%2Fe64b9bd6d6fd0e199406ef1848511753%2Fedge-functions-i18n.vercel.app_.png"
---

# i18n in Edge Middleware

This template shows how to redirect users based on i18n configuration.

---
name: i18n in Edge Middleware
slug: edge-functions-i18n
description: This template shows how to redirect users based on i18n configuration.
framework: Next.js
useCase: Edge Middleware
css: Tailwind
deployUrl: https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/i18n&project-name=i18n&repository-name=i18n
demoUrl: https://edge-functions-i18n.vercel.app
relatedTemplates:
  - ab-testing-simple
---

# i18n

This example shows how to redirect users based on i18n configuration.

## Demo

https://middleware-i18n.vercel.app

## How to Use

You can choose from one of the following two methods to use this repository:

### One-Click Deploy

Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-middleware/i18n&project-name=i18n&repository-name=i18n)

### Clone and Deploy

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [pnpm](https://pnpm.io/installation) to bootstrap the example:

```bash
pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/i18n i18n
```

Next, run Next.js in development mode:

```bash
pnpm dev
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=edge-middleware-eap) ([Documentation](https://nextjs.org/docs/deployment)).

## Related Templates

### [A/B Testing Simple](https://vercel.com/templates/next.js/ab-testing-simple)

By A/B testing at the edge, you'll reduce CLS from client-loaded experiments and improve your site's performance with smaller JS bundles.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
