English is not the first language of most Internet users, and its share of web content has been shrinking. W3Techs records a drop from 57.7% to 49.4% since January 2023, while Spanish, German, Japanese, Italian, Portuguese and Dutch usage climbs; a CSA Research study meanwhile found that 65% of Internet users prefer content in their own language. Since Radar marked its fourth birthday in September 2024, with its graphs appearing in publications and on social feeds worldwide, the team set out to deliver the product across twelve languages. The Radar and Globalization teams did the work together, and it required internationalizing the product before any translation could begin.
Localization versus internationalization
Localization (l10n) adapts content for a region: translation plus the imagery and cultural elements that shape how the content lands. The aim is copy that reads as if it had been written for that region in the first place, not English swapped out for translated text. It covers language, tone and message, images (maps with disputed territories being the obvious hazard), and date, time, measurement and number formats, which vary by location and sometimes within a single language — "December 15, 2018" in the U.S. is "15 December 2018" in the U.K., before the month/day versus day/month confusion even comes up.

Film offers a working model. Pixar internationalizes its production so scenes can be replaced or inserted for different markets: in Inside Out (2015), Riley's childhood ice hockey memory becomes soccer for audiences less familiar with the sport. The Shining (1980) took the same approach decades earlier, shooting and cutting the "All work and no play makes Jack a dull boy" typewriter scene separately for each language and splicing the localized version into that market's prints.


Preparing the code: hard-coding and externalization
Internationalization (i18n) is the preparatory step that makes a product ready to be translated and adapted for multiple languages and cultures; the more thoroughly it is done, the cheaper and faster localization becomes. For Radar, it started with an audit of hard-coded strings — text embedded directly in source code, which is quick to write but hard to change or translate later. Most of the strings on Radar's pages were hard-coded, so externalization came first: extracting localizable text from the code into separate files.
Hard-coded strings:
import Card from “~/components/Card”;
import Chart from “~/components/Chart”;
export default function TrafficChart() {
return (
<Card
title="Traffic"
description="Share of HTTP requests"
>
<Chart />
</Card>
);
}
Externalized key placeholders:
import { useTranslation } from "react-i18next";
import Card from “~/components/Card”;
import Chart from “~/components/Chart”;
export default function TrafficChart() {
const { t } = useTranslation();
return (
<Card
title={t("traffic.chart.title")}
description={t("traffic.chart.description")}
>
<Chart />
</Card>
);
}
Moving strings into their own files carries three benefits:
- Translators work on isolated files containing only localizable strings
- The code itself cannot be accidentally altered by that work
- Developers can ship updates and fixes without recompiling or redeploying per language
When the code is compiled or deployed, it reaches the key traffic.chart.title, matches it in the JSON file — line 1090 in the example — and resolves it to "Traffic" in English, "Tráfego" in Portuguese and "トラフィック" in Japanese, repeating the lookup for every localized JSON file present.

Finding what was missed
Pseudo translation
Not every string is easy to locate; some sit deep in legacy, inherited code or APIs. Pseudo translation flushes them out. Each character is replaced with a similar-looking one, the string is wrapped in brackets and padded with extra characters that simulate text expansion, which keeps the content mostly readable while flagging hard-coded text and stress-testing the UI for language readiness and length variability. A string like Routing Information becomes [R~óútíñg Í~ñfó~rmát~íóñ]. Anything left in plain English after pseudo translation is probably hard-coded or coming from another source: labels such as ASN, Country, Name and Prefix Count survived untouched and had to be externalized. The Globalization team worked with Radar's developers to report and fix these and the issues below.

Text expansion
Translated content often occupies more space than the original. English to German can expand by an average of up to 35%, Spanish by 30% and French by 20%, with horizontal growth; Asian languages may contract relative to English but expand vertically. The shorter the English string, the greater the relative expansion tends to be.

Mock-ups should therefore be tested with longer text, because anything that barely fits its container in English will likely overflow or break the layout elsewhere. In Radar's fixed-width sidebar, truncating the main navigation labels was not acceptable, so localized buttons wrap — and can end up taller than their English counterparts. Visual consistency sometimes has to give way to usability.

String concatenation
English chains words easily because it has few inflections, and most programming languages were designed around English. A familiar illustration of the ambiguity that creates: is an English teacher a teacher of English or a teacher from England? Assembling sentences from separately translated fragments fails for the same reasons — a phrase like A lovely little old rectangular green French silver whittling knife would be a translator's nightmare. Most Western languages need prepositions, articles or inflections as glue, and most languages do not share English's sentence structure; sentences may have to be completely reversed to read correctly. It gets worse when a string omits a placeholder because the developer assumes it will be prefixed or appended, as in "is currently categorized as:". Placeholders must live inside the string so translators can move them, e.g. "Distribution of {{botClass}} traffic by IP version", which in Simplified Chinese moves the placeholder to the front: "{{botClass}} 流量分布(按 IP 版本)".
String reuse
Reusing one string in several places and swapping the placeholder contents looks efficient, but breaks in gendered languages, which is most European ones. In Spanish, a standalone word as simple as "open" has several possible translations depending on position and context.

The same applies to Custom, Detected and Disabled, whose correct translation depends on where they sit in a sentence, where they appear in the UI, and whether they accompany a singular or plural, masculine or feminine noun; additional entries may be needed in the language files. Translators must also know what each placeholder will contain, because the surrounding wording may need to agree with a masculine, feminine or neutral term (German has all three). A placeholder that can stand in for more than one gender makes the translation grammatically wrong in at least some cases. Consider Your use of the URL Scanner is subject to our {{link1}}. Any personal data in a submitted URL will be handled in accordance with our {{link2}} — the translator cannot know which grammatical form to use around the links. Supplying component placeholders with their text embedded gives the needed context: Your use of the URL Scanner is subject to our <link1>Online Service Terms of Use</link1>. Any personal data in a submitted URL will be handled in accordance with our <link2>Privacy Policy</link2>.
Locale-specific behavior
Dates
Date conventions differ by country, and so does the first day of the week, which follows the country or culture rather than a fixed rule. Radar's date picker, for example, differs between American English, European Spanish (where weeks start on Monday) and Simplified Chinese.

Developers do not need to enumerate these rules themselves: Intl.DateTimeFormat and Date.toLocaleString() handle them. Note that the options accepted by Intl.DateTimeFormat are not the string tokens familiar from libraries such as Day.js or Moment.js. Those libraries keep the token order fixed, along with any delimiters you add, unless you switch to their localized string tokens — a problem, since the order of date parts should follow the locale. Intl.DateTimeFormat takes care of this and removes the need for a formatting dependency and its locale resources.
A generic React component built with Intl.DateTimeFormat and react-i18next renders "Tue, Oct 1, 2024" for en-US and "2024年10月1日(火)" for ja-JP:
import { useTranslation } from "react-i18next";
export default function SomeComponent() {
const { i18n } = useTranslation();
const date = new Date("2024-10-01");
return (
<time dateTime={date.toISOString()}>
{new Intl.DateTimeFormat(i18n.language, {
weekday: "short",
month: "short",
year: "numeric",
day: "numeric",
}).format(date)}
</time>
);
}
Numbers
Number notation is equally locale-dependent. The US and UK use a period as the decimal separator and a comma for thousands; other countries reverse them or use a space for grouping. Intl.NumberFormat covers this. The same kind of React component renders "12,345,678.90" for en-US and "12 345 678,90" for pt-PT. Its options support decimals, percentages and currencies, and control details such as decimal places and rounding strategies.
import { useTranslation } from "react-i18next";
export default function SomeComponent() {
const { i18n } = useTranslation();
return (
<span>{new Intl.NumberFormat(i18n.language, {
style: "decimal",
minimumFractionDigits: 2,
}).format(12345678.9)}</span>);
}
As of mid-December, regionalized number formatting was not fully implemented on Radar; the work is expected to be complete by the end of Q1 2025.
Sorting lists
Translating the items of a list is not enough when order matters, as with a country dropdown. "South Africa" becomes "África do Sul" in Portuguese and must move near the top. Languages also impose sorting rules well beyond A–Z: several Asian languages do not use Latin characters at all and may sort by stroke or character radical. Even locale-specific collation shows up visually:

A generic React country selector can import countries with a name and alpha-2 code and sort options by translated name using String.localeCompare together with react-i18next. Intl.Collator options can be passed to localeCompare() for specific sorting needs.
import { useTranslation } from "react-i18next";
import Select from "~/components/Select";
import COUNTRIES from "~/constants/geo";
export default function CountrySelector() {
const { t, i18n } = useTranslation();
const options = COUNTRIES.map(({ name, code }) => ({
label: t(name, { ns: "countries" }),
value: code,
})).sort((a, b) => a.label.localeCompare(b.label, i18n.language));
return <Select options={options} onChange={(option) => { /* do something */ }} />;
}
When the API only speaks English
Many Radar screens and reports surface output from Cloudflare or third-party APIs, and the vast majority of those APIs return English only. Mixed with translated UI, this makes a site look poorly localized. Radar's approach is to map API outputs into separate files, translate every message that can be translated, and display the translation instead of the raw output. As APIs evolve — new messages appearing, existing ones changing — this turns into an endless game of whac-a-mole.
"Address unreachable error when attempting to load page": "Error de dirección inaccesible al intentar cargar la página",
"Authentication failed": "Autenticación fallida",
"Browser did not fully start before timeout": "El navegador no se ha iniciado por completo antes de agotar el tiempo de espera.",
"Certificate and/or SSL error when attempting to load page": "Error de certificado y/o SSL al intentar cargar la página",
"Crawl took too long to finish": "El rastreo ha tardado demasiado en completarse.",
"DNS resolution failed": "Error de resolución de DNS",
"Network connection aborted.": "Conexión de red cancelada"
APIs should accept a locale parameter or header, and engineers should keep multiple languages in mind while building them, even for error messages alone. That can save time and resources for every client they serve.
Implementation in Remix
Radar is a Remix project deployed on Cloudflare Pages. After researching options and experimenting, the team adopted Sergio Xalambrí's remix-i18next, largely following the repository's installation instructions with a few changes.
Each locale folder holds multiple translation files, one per data source, which keeps strings originating from APIs maintainable. Each file becomes a namespace, which prevents key collisions and lets namespaces load separately per route or component.
remix-i18next's documented approach to loading files is backend plugins, but i18next-fs-backend cannot be used on Cloudflare Pages because there is no filesystem access. Radar instead uses the resources approach, similar to the remix-i18next with vite sample, with one addition: maintaining the resources dictionary by hand for every new namespace was undesirable, so Vite's glob imports build it:
import { serverOnly$ } from "vite-env-only/macros";
export const resources = serverOnly$(
Object.entries(import.meta.glob("./*/*.json", { import: "default" })).reduce(
(acc, [path, module]) => {
const parts = path.split("/").slice(1);
const locale = parts[0];
const namespace = parts[1].split(".")[0];
if (!acc[locale]) acc[locale] = {};
if (!acc[locale][namespace]) acc[locale][namespace] = {};
module().then((value) => (acc[locale][namespace] = value));
return acc;
},
{},
),
)!;
The result is a server-side-only resources dictionary: all JSON files in the locales folder are imported and passed as the resources property of the i18next configuration in Remix's entry.server.tsx.
Client-side namespace loading goes through a Remix resource route that reads the resources dictionary and returns the namespace object for the requested locale:
import { LoaderFunctionArgs } from "@remix-run/server-runtime";
import { resources } from "~/i18n";
export async function loader({ params }: LoaderFunctionArgs) {
const { locale, namespace } = params;
return resources[locale]?.[namespace] || {};
}
The i18next configuration in entry.client.tsx can then use the i18next-http-backend or i18next-fetch-backend plugins:
import i18next from "i18next";
import i18nextHttpBackend from "i18next-http-backend";
import { initReactI18next } from "react-i18next";
import { getInitialNamespaces } from "remix-i18next/client";
import { options } from “~/i18n”;
await i18next
.use(initReactI18next)
.use(i18nextHttpBackend)
.init({
...options,
ns: getInitialNamespaces(),
backend: { loadPath: "/api/i18n/{{lng}}/{{ns}}" },
});
Default namespaces are set with the defaultNS config property:
export const defaultNS = ["main", "countries"];
Per-route namespaces are declared through Remix's handle export:
export const handle = {
i18n: ["url-scanner", "domain-categories"],
};
On the server, the getRouteNamespaces function in entry.server.tsx picks those up:
const ns = i18n.getRouteNamespaces(remixContext);
Examples suggested declaring namespaces on each useTranslation() instance on the client; Radar worked around that in root.tsx:
import { useLocation, useMatches } from "@remix-run/react";
import { useTranslation } from "react-i18next";
import { defaultNS } from “~/i18n”;
export function Layout({ children }) {
const location = useLocation();
const matches = useMatches();
const handle = matches?.find((m) => m.pathname === location.pathname)?.handle || {};
useTranslation([...new Set([...defaultNS, ...(handle.i18n || [])])]);
...
}
This makes the client-side plugin call the resource route and load the required namespaces.
Radar also wanted the locale in the URL pathname, but not for the default language, which Remix's optional segments allow. remix-i18next has no URL locale detection by default, but it accepts a custom findLocale function that receives the request, so the locale can be parsed from the request URL.
Search engine optimization
Once internationalization is in place, search engines can be told about localized versions of pages, so results are served in the language being searched.
<head>
...
<link rel="alternate" href="https://radar.cloudflare.com/" hreflang="en-US">
<link rel="alternate" href="https://radar.cloudflare.com/de-de" hreflang="de-DE">
<link rel="alternate" href="https://radar.cloudflare.com/es-es" hreflang="es-ES">
<link rel="alternate" href="https://radar.cloudflare.com/es-la" hreflang="es-LA">
<link rel="alternate" href="https://radar.cloudflare.com/fr-fr" hreflang="fr-FR">
<link rel="alternate" href="https://radar.cloudflare.com/it-it" hreflang="it-IT">
<link rel="alternate" href="https://radar.cloudflare.com/ja-jp" hreflang="ja-JP">
<link rel="alternate" href="https://radar.cloudflare.com/ko-kr" hreflang="ko-KR">
<link rel="alternate" href="https://radar.cloudflare.com/pt-br" hreflang="pt-BR">
<link rel="alternate" href="https://radar.cloudflare.com/pt-pt" hreflang="pt-PT">
<link rel="alternate" href="https://radar.cloudflare.com/zh-cn" hreflang="zh-CN">
<link rel="alternate" href="https://radar.cloudflare.com/zh-tw" hreflang="zh-TW">
<link rel="alternate" href="https://radar.cloudflare.com/" hreflang="x-default">
<link rel="canonical" href="https://radar.cloudflare.com/">
...
</head>
Page titles, descriptions and relevant Open Graph metadata should be localized too. With Remix and remix-i18next, the getFixedT method in route loaders resolves translations and returns the data for the meta export:
import type { LoaderFunctionArgs, MetaArgs } from "@remix-run/server-runtime";
import i18n from "~/i18next.server";
export async function loader({ request }: LoaderFunctionArgs) {
const t = await i18n.getFixedT(request);
return {
meta: {
title: t("meta.about.title"),
description: t("meta.about.description"),
url: request.url,
},
};
}
export const meta = ({ data }: MetaArgs<typeof loader>) => data.meta;
If default meta tags are defined in parent routes, the meta objects may also need to be merged.
Reflections
Languages rarely have absolutes: two speakers of the same Spanish, French or Japanese will differ even if they grew up next door, shaped by family, education, environment and relationships. Localization is hard, and many things can go sideways, with unknowns surfacing along the way. It can also improve a product by stress-testing its code and design. A tight relationship between the globalization and Radar teams helped the effort go more smoothly, and the translators took on the challenge: learning Radar, analyzing the English source, choosing wording that resonates with the audience while fitting the allotted space, checking context, previous translations, consistency and industry standards, adapting to style guides, tone and messaging — and accepting that some readers will disagree with their choices. The localized versions of Cloudflare Radar can be selected from the language drop-down in the upper right corner of the interface, and the selection persists until changed; feedback on translations goes to [email protected].



