Menu

1 / 2

Building a 10-language B2B site: the localization bugs our code checks missed

DEV Community: astro·MinJian·3 days ago
#2mm67zPJ
#devtoastro#devto#dev#language#product
Reading 0:00
15s threshold

We built Custom Sign Forge as a B2B website for custom commercial signage. The public site has ten language versions and six product families. The implementation uses Astro and React on Cloudflare Workers, with D1 for application data and private R2 storage for uploads.

The interesting part was not adding a language switcher. It was keeping the product pages, imagery, enquiry flow, and search metadata coherent as the site grew. Here are the lessons that would carry into another multilingual build.

1. Keep locale routing explicit

English uses the original URLs; other languages have prefixes such as /zh/, /pt-br/, and /ar/. We do not redirect visitors based on IP address or browser language. A visitor can choose a language and share a stable URL.

One routing module owns the conversion between equivalent pages. Product slugs and internal field codes remain stable. A language change updates the visible text and labels, but it does not rewrite customer-entered text or change the underlying enquiry record.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.