all posts

Product

Notes on a bilingual Next.js build

· 3 min read· by Cubetek

When you build for two languages from day one, a few decisions pay off fast.

Keep the locale in the URL

Per-locale URLs (/blog/en, /blog/ar) stay cacheable and crawlable, and let search engines serve the right language with hreflang.

Mirror with logical properties

Instead of margin-left, reach for margin-inline-start. The layout flips automatically under dir="rtl" — no duplicated styles.

.card {
  padding-inline-start: 1rem;
  border-inline-start: 2px solid #3dffb0;
}

Small habits, big payoff.