ForHosting KIT · Translation

Localize units

A product page for Berlin says 180 cm; the same page for Chicago needs inches, and 180 cm comes out as 70.866142 in. Length, weight, volume, temperature and area are covered, each written the way the target market reads it. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Converted value
180
Source unit
cm
Target unit
in
You get
Converted value
70.866142

A product page written for Berlin says 180 cm; the same page for Chicago should say 5'11".

The problem with 'just translate it'

Translation moves words across languages, but measurements follow a different map entirely: the United States and a handful of other countries still run on imperial while most of the world reports in metric, and even within metric there are regional habits around decimal commas versus points, spacing before symbols, and which unit is idiomatic (a European recipe says grams, an American one says cups).

Teams that only localize strings end up shipping a perfectly translated page with a measurement that reads as foreign or, worse, gets miscalculated by a shopper doing mental math.

Where units came from, briefly

The metric system was formalized in France in the 1790s specifically to replace a patchwork of local, often town-specific measures with one coherent standard; imperial units persisted in the United States, Liberia and Myanmar largely through legacy and industrial inertia rather than technical merit. That two-hundred-year-old split is still why a single product catalog sold globally needs two sets of numbers, not one, and why localization has to happen at the data layer, not just the copy layer.

Global product catalogs

An apparel brand stores one canonical size chart in centimeters and converts it on the fly to inches for the US storefront and back again, keeping a single source of truth.

Recipe platforms

A cooking site lets readers toggle between grams/milliliters and cups/ounces without maintaining two parallel recipe databases.

Travel and weather apps

A trip-planning app shows distances in kilometers to European users and miles to US users based on the device locale, pulled from the same underlying data.

Technical documentation

An industrial equipment manual auto-generates a metric and an imperial version from one source spec sheet before each release.

Is there a free tier?

The tool above runs free in your browser. No subscription, no tokens, and a failed task is never charged.

What happens if a request fails?

The task retries automatically up to three times; if it still fails you get a clear error and you are never charged for it.

Is my data kept after processing?

No. Results are deleted after the retention window and are never used to train models.

Which countries still use imperial units?

The United States, Liberia and Myanmar still rely on imperial measures, while most of the world reports in metric. That split is why a catalogue sold everywhere needs two sets of numbers, not one.

How is this different from a plain unit converter?

A plain converter turns one unit into another. This tool adapts the measurement to the reader’s market: it uses the system that market reads and writes the result with its own decimal mark, spacing and abbreviation style.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/locale/units

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/locale/units \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":100,"from":"km","to":"mi"}'
{
  "value": 100,
  "from": "km",
  "to": "mi"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "locale.units",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This endpoint rewrites numbers, units and notation so every market reads its own system natively, without a translator ever touching a spec sheet.

What the endpoint actually does

Send POST /locale/units with a body of text or structured values plus a target locale, and the task parses quantities, recognizes their unit family (length, weight, volume, temperature, area), and returns the equivalent expressed the way that locale expects — including the correct decimal separator, spacing convention and abbreviation style. It runs asynchronously: you get a task_id immediately and the finished conversion arrives by signed webhook, or you can pull it from a signed link that stays valid for 24 hours.

Who reaches for this

E-commerce catalogs syncing size charts across storefronts, recipe and nutrition platforms serving both metric and imperial audiences, travel and weather apps localizing distance and temperature per device region, and engineering documentation tools that need spec sheets to read correctly no matter who opens them.

Fitting it into a pipeline

Because the call is async and billed per request at a flat $0.002 regardless of payload complexity, it drops cleanly into batch jobs — a nightly catalog sync, a CMS publish hook, or a webhook chain after a translation task — without needing to budget per-unit cost or worry about rate-limited retries; a failed task is never billed, and the system retries three times before surfacing a clear error.

What unit families does the unit localization API support?

Length, weight, volume, temperature and area, along with locale-correct decimal separators and spacing conventions.

How is it priced?

A flat $0.002 per request, published and predictable, with no hidden per-unit surcharges regardless of how many values are in the payload.

How do I get the result back?

Either a signed webhook call when the task finishes, or a signed link you can fetch for 24 hours — no polling required.

Does it translate the surrounding text too?

No, this endpoint focuses on measurements and notation; pair it with a translation task if you also need the surrounding copy localized.

Can I send bulk requests?

Yes, each call is billed and processed independently, so batching a catalog into many requests works well for nightly sync jobs.

Read the full KIT documentation →