International Websites: Locale URLs, Hreflang and Formatting Without Guesswork
Language, country and formatting are related but different choices. Give translated pages stable URLs, preserve user selection and keep search signals aligned with real equivalents.

A site switches language from the visitor's IP address and offers no way back. A traveller sees the wrong content, a bilingual reader cannot share the page they wanted, and the search crawler receives whichever locale the server guessed.
Internationalisation needs an explicit model. Language, market, currency and date formatting should not collapse into one undocumented country assumption.
Choose stable locale URLs
Use a deliberate URL structure for translated content, such as locale subdirectories, when that fits the site. Each meaningful translation should have a stable address that can be linked and indexed.
Avoid serving radically different indexed content at the same URL solely from cookies or location. A visitor should be able to copy the address and share the intended language version.
A language suggestion can use browser preferences, but let the reader choose. Do not force repeated redirects that make a manually selected locale inaccessible.
Separate language from market
English content for several countries may share a translation while prices, availability or legal terms differ. Conversely, a single country can require multiple languages.
Represent those distinctions in the data model. Do not assume locale automatically determines currency or that a currency determines the audience's language.
Keep the original values for dates and money, then format for display. Never parse a formatted currency string back into business logic.
const formatted = new Intl.NumberFormat(class="text-code-string">"en-NG", {
style: class="text-code-string">"currency",
currency: class="text-code-string">"NGN",
}).format(25000);This displays an illustrative amount using a chosen locale and currency. It does not convert currencies or establish the price your business charges. Conversion, tax and pricing policy require separate authoritative data.
Declare document language
Set the appropriate lang on the document or relevant content section. Screen readers and text processing rely on it. A translated navigation menu around an untranslated article does not make the article translated.
Support right-to-left layout where required using logical properties and deliberate direction settings. Do not simply reverse every flex row. Numbers, code blocks and embedded Latin identifiers may need their own handling.
Test long translations. Buttons and navigation should accommodate actual strings rather than assuming English length. Avoid shrinking type until the interface technically fits but becomes uncomfortable to read.
Link genuine equivalents
Hreflang can describe alternate language or regional versions for search systems. Use supported language and region syntax and ensure the alternates are reciprocal and include the relevant self-reference.
Only link equivalent content. A translated category page is not an equivalent replacement for an untranslated detailed article. When a translation is missing, present that limitation honestly rather than manufacturing an alternate mapping.
Keep canonical choices consistent. Independently translated pages generally need their own appropriate canonical URLs; pointing every locale to the English page can undermine the intended indexing signals.
Design the language switcher
Show recognisable language names and preserve the current task where an equivalent page exists. If there is no equivalent, explain the destination rather than silently dropping the reader onto the homepage.
Avoid flags as the only labels. Flags represent countries, not languages, and many languages cross national boundaries.
Persist the visitor's explicit choice according to the site's storage and privacy policy. A manual preference should take precedence over a later geographic guess.
Keep translation state visible to editors
Track source revision and translation revision. A translation can exist but be outdated after the original procedure changes. For technical guides, that can create unsafe instructions across locales.
Mark untranslated fields and review required updates before publication. Machine translation may assist a workflow, but technical accuracy, terminology and local conventions still need appropriate review.
Do not publish empty locale pages solely to claim international coverage. Search and readers need meaningful content, not a network of alternate tags around placeholders.
Test the whole journey
Open each locale directly, use browser back and forward, switch languages and share the resulting URL. Verify titles, metadata, document language and alternate mappings.
Test dates around time-zone boundaries and currencies with different formatting rules. Use actual translated strings, mobile widths and assistive technology. A layout tested only with short English placeholders is not an international layout test.
International support works when the reader can choose a stable version and the application keeps language, market and values coherent. The architecture should make those choices explicit rather than hiding them inside a redirect.
Paj Digital Labs
The engineering journal of Paj Digital Solutions — hosting, server infrastructure and web engineering, written by the people who run the servers.
Related reading

Progressive Enhancement for Article Sites: The Page Should Outlive Its Scripts
Core reading and navigation should remain available when hydration or a third-party script fails. Start with useful HTML and layer interactions without turning every link into an application dependency.

Website Search That Finds Answers: Ranking, Typos and Empty Results
Search quality depends on the documents and ranking rules, not the size of the input box. Index useful fields, handle imperfect queries and give readers a way forward when nothing matches.

Accessible Dialogs: Focus, Escape and the Page Behind the Window
A dialog must manage more than its appearance. Use a maintained primitive, move focus deliberately and keep the background unavailable until the task ends.