Building a web application for a single language and region is straightforward until your user base expands into bilingual markets—like Canadian job portals, European e-commerce platforms, or international SaaS dashboards. Suddenly, hardcoded strings, rigid date formats, and single-language search indexes start breaking the user experience.
Looking at how bilingual regional employment portals serve both French- and English-speaking candidates across localized job listings, clean internationalization (i18n) clearly goes far beyond swapping button labels. It shapes URL structure, database queries, and how users filter dynamic listings.
If you are adding multi-language support to a frontend or data-driven web app, four architectural decisions keep your codebase clean as locales grow.
1. Make the Locale Explicit in Your Routing Structure
Relying solely on browser headers or hidden session cookies to switch languages creates messy caching bugs and makes sharing direct links unreliable.
- Prefix routes with the active locale (
/fr/...and/en/...) so every listing, search result, and detail view has a deterministic, shareable URL. - Include proper
hreflangalternate tags in your document head so search engines serve the right language version to the right audience automatically.
2. Separate UI Chrome from Dynamic Content Records
Translating navigation menus and form labels belongs in static JSON or TypeScript message dictionaries—not in your database.
- Keep static interface strings version-controlled in lightweight locale files with strict TypeScript keys so missing translations fail at build time rather than in production.
- For user-generated or employer-submitted records (such as job descriptions, titles, and category tags), store a
language_codecolumn alongside the record and allow optional linked translations rather than duplicating rows blindly.
3. Normalize Locale-Aware Formatting Early
Dates, currency symbols, decimal separators, and pluralization rules vary sharply across regions—for example, formatting hourly rates as 25,00 $ versus $25.00.
- Lean on the native browser
Intl.DateTimeFormatandIntl.NumberFormatAPIs instead of writing custom string-replacement helpers. - Store all timestamps in UTC and all monetary values as integer cents or normalized decimals in SQL, formatting them only at the presentation layer.
4. Account for Accents and Stemming in Search Inputs
When users search a bilingual catalog or job board, typing unaccented characters (like comptabilite instead of comptabilité) should still return accurate matches. Configuring accent-insensitive collations or PostgreSQL unaccent extensions makes search feel effortless regardless of keyboard layout.
What has been your biggest lesson or gotcha when building multi-language web apps? Share your tips in the comments.
