A Practical Guide to Translating & Localizing Your Web App: Using i18n and Lingo.dev
When building web applications for a global audience, it is important to consider localization—the process of presenting your web application's content in the local language or dialect of your visitors. This can be achieved using i18n frameworks. However, relying solely on i18n frameworks can be overwhelming to manage, especially in fast-paced environments where features and content are frequently shipped. Lingo.dev is an AI-powered localization tool that enables us to set up localization once and have it run on autopilot. In this tutorial, we will build a simple web page in English and translate it to 2 other languages using Lingo.dev and i18next. Prerequisites To follow along with this tutorial, you should install NodeJS, and have a solid understanding of at least one front-end framework or library. Setting Up Localization in a React Web App In order to demonstrate how Lingo.dev works in this tutorial, we will build a simple landing page that translates from English to French and Spanish. You can find a demo of the finalized app on Netlify. Since React is the most popular frontend framework, we’ll use it to build the demo. However, the same steps can be replicated across different frameworks. 1. Create a React Application To create the React application in the demo, we’ll follow these steps: Create a React project with Vite by running this command in your Command Line Interface (CLI): npm create vite@latest localization-app -- --template react Next, run the following commands one after the other: cd localization-app npm install Now, open up your project in VScode (or your preferred editor): code . Next, open your src/App.jsx file and replace it with the code below. It is a simple React component with some Tailwind CSS classes. // src/App.jsx export default function App() { return ( {/* Hero Section */} Deploy Faster, Pay Less A scalable, developer-friendly cloud hosting platform with seamless deployments. Get Started {/* Features Section */} Why Choose Us?

When building web applications for a global audience, it is important to consider localization—the process of presenting your web application's content in the local language or dialect of your visitors. This can be achieved using i18n frameworks. However, relying solely on i18n frameworks can be overwhelming to manage, especially in fast-paced environments where features and content are frequently shipped.
Lingo.dev is an AI-powered localization tool that enables us to set up localization once and have it run on autopilot.
In this tutorial, we will build a simple web page in English and translate it to 2 other languages using Lingo.dev and i18next.
Prerequisites
To follow along with this tutorial, you should install NodeJS, and have a solid understanding of at least one front-end framework or library.
Setting Up Localization in a React Web App
In order to demonstrate how Lingo.dev works in this tutorial, we will build a simple landing page that translates from English to French and Spanish. You can find a demo of the finalized app on Netlify.
Since React is the most popular frontend framework, we’ll use it to build the demo. However, the same steps can be replicated across different frameworks.
1. Create a React Application
To create the React application in the demo, we’ll follow these steps:
-
Create a React project with Vite by running this command in your Command Line Interface (CLI):
npm create vite@latest localization-app -- --template react
-
Next, run the following commands one after the other:
cd localization-app npm install
-
Now, open up your project in VScode (or your preferred editor):
code .
-
Next, open your
src/App.jsx
file and replace it with the code below. It is a simple React component with some Tailwind CSS classes.
// src/App.jsx export default function App() { return ( <div className="font-sans text-gray-900 bg-gray-50 w-screen"> {/* Hero Section */} <section className="bg-gradient-to-r from-blue-600 to-indigo-600 text-white text-center py-24 px-6"> <h1 className="text-5xl font-extrabold">Deploy Faster, Pay Less</h1> <p className="mt-4 text-lg max-w-2xl mx-auto"> A scalable, developer-friendly cloud hosting platform with seamless deployments. </p> <button className="mt-6 bg-white text-blue-600 hover:bg-gray-200 px-8 py-3 rounded-lg font-semibold shadow-md transition"> Get Started </button> </section> {/* Features Section */} <section className="py-20 px-6 text-center bg-gray-900 text-white"> <h2 className="text-3xl font-bold mb-8">Why Choose Us?</h2> <div className="grid md:grid-cols-3 gap-10"> <div className="p-8 bg-gray-800 rounded-lg shadow-lg"> <h3 className="text-2xl font-semibold">