i18n vs l10n: What Developers Need to Know

Dec 25, 2025

Your app works great in English. Then someone from Tokyo tries it—dates look wrong, buttons overflow because Japanese text doesn’t fit, and your carefully designed UI breaks.

This happens because the app was built for one language and one region. To fix it, you need two things: internationalization (i18n) and localization (l10n).

What Do These Terms Mean?

Internationalization (i18n) is preparing your codebase to support multiple languages and regions. The “18” comes from the 18 letters between ‘i’ and ‘n’ in “internationalization.” It’s a one-time engineering effort where you set up the structure—extracting text from code, using flexible layouts, and handling different formats.

Localization (l10n) is adapting your app for a specific region. The “10” comes from the 10 letters between ‘l’ and ‘n’ in “localization.” This involves translating text, adjusting cultural elements, and formatting dates/currency for each target market.

The order matters: You must internationalize first, then localize. You can’t translate text that’s hardcoded in your components.

What Internationalization Looks Like

1. Extract All Text Into Separate Files

Instead of writing text directly in your code:

// Don't do this - text is stuck in English
<h1>Welcome to our app!</h1>
<p>You have 5 messages</p>

Move text to translation files and reference them by keys:

// Do this - text can be swapped for any language
<h1>{t('home.welcome')}</h1>
<p>{t('home.messages', { count: 5 })}</p>

The translation files look like this:

// locales/en.json
{
"home.welcome": "Welcome to our app!",
"home.messages": "You have messages"
}

// locales/ja.json
{
"home.welcome": "アプリへようこそ!",
"home.messages": "件のメッセージがあります"
}

2. Use Locale-Aware Formatting

Dates, numbers, and currency display differently across regions:

Format US Germany Japan
Date 12/25/2024 25.12.2024 2024/12/25
Number 1,234.56 1.234,56 1,234.56
Currency $1,234.56 1.234,56 € ¥1,235

Use the built-in Intl APIs instead of manual formatting:

// Dates - automatically formats based on locale
new Date().toLocaleDateString('de-DE') // "25.12.2024"
new Date().toLocaleDateString('en-US') // "12/25/2024"

// Numbers
new Intl.NumberFormat('de-DE').format(1234.56) // "1.234,56"

// Currency
new Intl.NumberFormat('ja-JP', {
style: 'currency',
currency: 'JPY'
}).format(1234) // "¥1,234"

3. Design Flexible Layouts

Text length varies dramatically between languages:

  • German text is ~30% longer than English (“Submit” → “Einreichen”)
  • Chinese text is often shorter but taller
  • Arabic and Hebrew read right-to-left (RTL)

Your UI needs to handle this. Use flexible containers, avoid fixed widths for text, and test with longer strings.

4. Use UTF-8 Encoding

UTF-8 supports characters from all languages—Japanese kanji, Arabic script, emoji, everything. Set it everywhere: database, files, HTTP headers.

<meta charset="UTF-8">

What Localization Looks Like

Once your code is internationalized, localization is the ongoing work of adapting for each market:

Translation: Convert all text to the target language. Use professional translators—machine translation (Google Translate) produces awkward results that native speakers notice immediately.

Cultural adaptation: Colors, images, and symbols mean different things in different cultures. Red means danger in the West but luck in China. A thumbs-up is offensive in some Middle Eastern countries.

Format adjustment: Even after using Intl APIs, you may need to adjust how information is presented. Address formats, phone number formats, and name order (given name vs family name first) vary by region.

Legal compliance: Privacy policies, terms of service, and data handling may need adjustment for local laws (GDPR in Europe, for example).

Common Mistakes

Hardcoding strings: Every piece of user-facing text needs to be extracted. Missing even one string means a mixed-language experience.

Concatenating strings: Don’t build sentences by joining parts—word order changes between languages.

// Bad - assumes English word order
t('welcome') + ', ' + userName + '!'

// Good - lets translators control the structure
t('welcome_user', { name: userName })

Ignoring pluralization: English has simple rules (1 item, 2 items), but other languages are complex. Russian has different forms for 1, 2-4, 5-20, and 21. Use your i18n library’s pluralization features.

Using machine translation: It’s tempting for MVPs, but native speakers can tell. It damages trust.

How to Get Started

Choose a library based on your framework:

  • React: react-i18next or react-intl
  • Vue: vue-i18n
  • Angular: @angular/localize
  • Node.js: i18next

Set up your file structure:

src/
locales/
en.json # English (your default)
es.json # Spanish
de.json # German
ja.json # Japanese

Use a consistent naming convention for keys:

{
"nav.home": "Home",
"nav.settings": "Settings",
"auth.login": "Log in",
"auth.logout": "Log out",
"errors.not_found": "Page not found"
}

Test with pseudo-localization: Most i18n libraries can generate fake translations that are longer and use special characters. This helps catch layout issues before real translation.

When to Implement

MVP stage: If you’re validating product-market fit in one region, skip it. Focus on the product first.

Growth stage: Implement i18n before you need it. Adding it later means touching every component. Add l10n as you expand to new markets.

Global launch: Both are required. Budget for professional translation—it’s not optional.

Cost reality: i18n is engineering time (one-time). l10n requires translators for each language (ongoing cost, typically $0.10-0.25 per word).

Summary

i18n l10n
What Prepare code for multiple languages Adapt for a specific region
When Once, during development For each new market
Who Developers Translators + developers
Cost Engineering time Translation fees

The key insight: Do i18n early, even if you only support English today. It’s much harder to retrofit later. Then add l10n market by market as you grow.

Your app can reach users worldwide. It just needs to speak their language.

Recommendations

Things to Do as a Frontend Architect: A Complete Guide

#Frontend

,

#Architecture

,

#JavaScript

,

#Web Development

,

#Best Practices

,

#Leadership

,

#Performance

,

#Developer Experience

A comprehensive guide to the responsibilities, tasks, and best practices for...

Dec 15, 2025

Understanding CRDTs: The Magic Behind Collaborative Editing

#CRDT

,

#Collaborative Editing

,

#Distributed Systems

,

#Real-time

,

#Tech Explained

A friendly deep dive into CRDTs and how they power real-time collaborative...

Oct 20, 2025

React Composition Patterns: Beyond Boolean Props

#React

,

#JavaScript

,

#Web Development

,

#Component Design

,

#Software Architecture

Learn how React compound components and composition patterns can help you escape...

Oct 6, 2025

10 Vue Debugging Tips That Will Transform Your Development Workflow

#Vue.js

,

#Debugging

,

#JavaScript

,

#Frontend

,

#DevTools

,

#Development

,

#Web Development

,

#Vue DevTools

Master Vue.js debugging with 10 battle-tested techniques from real developers....

Aug 26, 2025

Building a Cross-Repository Test Automation Pipeline: From Manual QA Nightmares to Automated Excellence

#automation

,

#testing

,

#CI/CD

,

#GitHub Actions

,

#Playwright

,

#SDK

,

#engineering

,

#DevOps

Learn how to build a cross-repository test automation pipeline that reduced our...

Aug 20, 2025

JavaScript Performance Optimization, 10 Techniques That Actually Move the Needle

#javascript

,

#performance

Discover 10 JavaScript performance optimization techniques that deliver real,...

Aug 18, 2025

Building a Blog Publisher MCP Server to Automate Your Content Workflow with Claude

#MCP

,

#Claude

,

#Automation

,

#TypeScript

,

#GitHub

,

#Blogging

,

#Tutorial

,

#AI Tools

Learn how to build a custom MCP server that lets Claude publish and manage blog...

Aug 7, 2025

20 JavaScript Interview Questions You Should Know in 2025

A practical guide to 20 core JavaScript interview questions — with clear...

Jul 24, 2025

Building a Simple, Scalable Feature Flag System

#nextjs

,

#prisma

,

#feature-flags

,

#fullstack

,

#backend

,

#api-routes

,

#clean-architecture

,

#scalable-design

,

#product-rollout

Built a simple yet scalable feature flag system using Next.js API routes and...

Jul 6, 2025

I Refactored Without Changing a Feature — And It Broke Everything

#HyrumsLaw

,

#Refactoring

,

#LegacyCode

,

#CodeSmells

,

#TechDebt

,

#SoftwareEngineering

,

#CleanCode

Understanding Hyrum’s Law with a Real-World Lesson on Porting vs Refactoring

Jul 5, 2025

How to Publish Your First npm Package: Creating Rainbow Highlight with Utilities

#npm

,

#npm-package

,

#web

,

#javascript

Learn how to create and publish your first npm package. This step-by-step guide...

Sep 22, 2024

Google Dorking: Unlocking Hidden Search Capabilities & Insights

#seach

,

#seo

,

#research

Explore 16 advanced Google Dorking techniques to uncover valuable data, security...

Aug 8, 2024

This One HTML Attribute Could Save Your Web App from a Security Nightmare

#web-security

,

#cdn

,

#web

Web security is a critical concern for developers, yet some of the most...

Jun 29, 2024

Are You Still Using Basic CSS? Here Are 7 Tricks to Get Ahead of the Curve

#css

Bored of the same old CSS? Unleash 7 hidden gems to take your designs to the...

Dec 27, 2023

Easiest way to store your logs in a file WITHOUT chaging the source file(node)

#productivity

Often, developers face challenges when dealing with a flood of logs in the...

Dec 21, 2023

Build Your Own Pinterest-Style Masonry Grid: A Step-by-Step Guide

#css

,

#web

,

#layout

Create a masonary grid layout with left to right content flow, supporting...

Dec 10, 2023

Using git diff and git apply to Share Local Changes with Peers

#git

,

#productivity

,

#software_engeneering

,

#dev

git diff and git apply are two powerful Git commands that can be used to share...

Nov 12, 2023

React Portals: Render Components Outside the current DOM Hierarchy

#react

,

#web

The createPortal API in React allows you to render child elements into a...

Jul 27, 2023

Cloning Made Easy: Try degit and Clone Directories within Repos.

#git

,

#productivit

Have you ever faced the dilemma of wanting just a small portion of a repository,...

Jul 19, 2023

Debugging Web Apps with Browser Dev Tools: 6 Amazing Tricks

#browser

,

#debugging

,

#web

Debugging web applications can be a challenging task, with errors like...

Jul 13, 2023

Controlled Versus Uncontrolled Components in React

#react

,

#forms

Understanding State Management Within Forms Comparing controlled and...

Nov 5, 2022

Format Numbers, Dates and Currencies with the Intl Object in Javascript

#javascript

,

#html

,

#web

Intl object can be used to format data into commonly used formats of dates,...

Sep 13, 2022

Image Masking on Hover Using CSS Clip Path and Javascript

#javscript

,

#css

,

#html

Image Masking can be used to add fancy hover highlight effects to images for...

Jul 23, 2022

Recreating CSS Tricks Fancy Grid Hover Effect

#html

,

#css

,

#UI

,

#recreation

CSS Trick had a simple yet cool grid layout which I found dope. So lets try to...

May 21, 2022

File Explorer Recursive React Component

#react

,

#javascript

,

#web

How to create a recursive folder Component using react.

Apr 16, 2022

Add Google Fonts to Your React & NextJS + TailwindCSS Project (Next 14)

#css

,

#tailwindcss

,

#react

,

#nextjs

,

#tailwind

,

#design

Use Google Fonts in Your TailwindCSS Projects

Apr 6, 2022

Event Delegation in Javascript

#javscript

,

#css

,

#html

,

#web

,

#performance

Handling multiple Events in Javascript with minimal CPU Usage

Mar 6, 2022

A Simple Web Accessibility Trick that you most probably missed!

#html

,

#css

,

#web-accessibility

,

#user-experience

Imagine that you cannot use the mouse and have to Navigate a Website with the...

Dec 23, 2021

Top Terminal Commands I Use For Productivity

#linux

,

#cli

,

#terminal

The whole point of development is solving problems. But very often we Developers...

Nov 3, 2021

CSS Logical Properties

#css

,

#html

CSS logical properties are properties which are used to design element on the...

Oct 5, 2021

Fluid Typography in CSS 💧

#css

,

#html

,

#typography

CSS Best Practices in Fluid Typography

Aug 15, 2021

CSS Units in a Nutshell 🐚

#css

,

#html

Are you still writing your css units in pixels and percentages? if you are then...

Aug 8, 2021

Master Markdown in 5minutes ⌚

#markdown

,

#documentation

Markdown is a lightweight markup language for creating formatted text using a...

Aug 1, 2021

What is JAMStack ✨

#jamstack

Jamstack stands for Javascript APIS and Markup and it is based on this idea of...

Jul 31, 2021

+

Check my latest Blog Post

i18n vs l10n: What Developers Need to Know

Read Now
Oh My Gawwdd!!!!!!!

Wow you have been viewing my site since 20 seconds!

+
+