Numbers Right, Units Missing: A Two-Layer Translation Check

in the translation, 1,234.50 becomes 1.234,50, may merely represent a change in the numeric format, or it might be incorrectly parsed as another quantity. Numer

Translating a quote, report, or technical document can quietly change the meaning of its numbers. 1,234.50 may become 1.234,50 because the number format changed, or a checker may read it as a different quantity altogether. Checking numbers and units separately from the words gives you a reliable way to catch these problems before a translation goes out.

This guide is for anyone who compares source and translated figures, including translators, reviewers, and finance or engineering teams. It explains how to declare your number-format rules, why matching values are not enough, and where automated conversion stops being safe. You will also get a short checklist for deciding which discrepancies need a human look.

Before you start: The examples in this guide use synthetic samples and were checked in an isolated environment. They do not guarantee results for every real file or product. Keep your original copies, and check results against the boundaries and acceptance criteria that apply to your work before processing important files.

How do you check numbers and units in a translation? The short answer

Declare your number-format rules first, compare normalized values second, and keep currency and units as separate fields.

Your situationWhat to doWhy
Source and translation use different separatorsDeclare the input format before comparing1,234.50 and 1.234,50 can be the same amount in different notations
The source format is unclearReject the guess and check the sourceGuessing can turn a value into a different quantity
The values match but the units or currency differTreat it as a failed checkA matching number with a changed unit is not a valid verification
You convert a valueKeep the original, the converted value, and the rationaleDecimal handles precision, not business rules
Figures appear in a quote, report, or specCheck amounts and units, then confirm against the originalThe numeric check flags possible discrepancies, but only the original shows what each figure means

Why does a number change when you translate it?

In translation, 1,234.50 becomes 1.234,50. Both can represent the same amount, written in a different convention. The risk is that a parser or a reviewer reads the value without knowing which convention applies, so the number is interpreted incorrectly.

Numerical verification should follow these principles:

  • Declare the input rules before you compare anything.
  • Compare normalized values, not raw strings.
  • Keep currency and units as separate, independent fields.

Which number formats does this approach cover?

This approach handles two explicit formats:

  • Comma as thousands separator and period as decimal separator (for example, 1,234.50).
  • Period as thousands separator and comma as decimal separator (for example, 1.234,50).

The following are outside the scope of this approach:

  • Spaces as thousands separators
  • Negative numbers enclosed in parentheses
  • Scientific notation
  • Other notations

If the source rules are unclear, reject the guess rather than assuming a format.

How do you validate the format and convert the value safely?

Follow these steps for each amount:

  1. Confirm the input matches one of the two declared formats.
  2. Reject the value if it does not match, and report it for review.
  3. Convert the validated string with Python's Decimal type, not with binary floating-point numbers.
  4. Record the original string alongside the converted value.

The following code shows the validation and conversion step. It receives an amount string that has already been identified and does not extract amounts from documents on its own.

import re
from decimal import Decimal

def amount(text, style):
    rules = {
        "comma_group": (r"-?(?:[0-9]{1,3}(?:,[0-9]{3})+|[0-9]+)(?:\.[0-9]+)?", ",", "."),
        "dot_group": (r"-?(?:[0-9]{1,3}(?:\.[0-9]{3})+|[0-9]+)(?:,[0-9]+)?", ".", ",")
    }
    if style not in rules:
        raise ValueError("unknown number convention")
    pattern, grouping, decimal = rules[style]
    if re.fullmatch(pattern, text) is None:
        raise ValueError("number does not match declared convention")
    return Decimal(text.replace(grouping, "").replace(decimal, "."))

assert amount("1,234.50", "comma_group") == amount("1.234,50", "dot_group")
assert amount("-12.50", "comma_group") == Decimal("-12.50")
assert (amount("12.50", "comma_group"), "USD") != (amount("12.50", "comma_group"), "EUR")
for bad in ["12,34.50", "1,234.50 USD", "NaN"]:
    try:
        amount(bad, "comma_group")
    except ValueError:
        pass
    else:
        raise AssertionError("invalid number accepted")

For details on the Decimal type, see the Python decimal documentation.

Do matching values prove that a translation is correct?

No. Identical values are not sufficient on their own. When you locate fields, keep the tags, currency, and source location with each value. A numerical match combined with a unit change does not count as valid verification. Examples include switching from kilograms to pounds, or from total price to unit price.

Use the table below to decide what to check and what to avoid doing automatically.

Comparison resultCheckDo not automatically
Same value, different currenciesHas the currency symbol been altered?Treat them as equivalent by default
Format does not match the declarationSource region or extraction errorRemove all punctuation unconditionally
Negative sign disappearsOriginal text and translation contextTake the absolute value automatically
Precision is reducedWhether rounding follows the rulesIgnore all differences

Why isn't Decimal enough on its own?

Using Decimal avoids certain binary floating-point representation errors. However, it cannot:

  • Choose the rounding rule for you.
  • Interpret tax amounts.
  • Perform currency conversions.

Whenever you convert a numeric value, record the following in your list:

  • The original value
  • The converted value
  • The rationale for the conversion

How should you accept numbers in a translated file?

Check numbers as a separate acceptance step. When you work with quotations, reports, or technical documents, list the amount and unit check items first, then cross-reference them with the translation. You can do this in OmniDoc.

The numerical check identifies potential discrepancies. You still need to return to the original text to confirm which business field each figure represents.

📊 At a glance

The two supported formats differ in which symbol separates thousands and which separates decimals:

FormatExampleThousands separatorDecimal separator
Comma-period1,234.50CommaPeriod
Period-comma1.234,50PeriodComma

🎯 Which approach fits you?

If you compare amounts in quotations or reports

Declare the input format, validate each amount, and record the original and converted values together.

If you work with unit-based technical documents

Treat any unit change as a failed check, even when the numbers match.

If the source format is unclear

Reject the value and check the source instead of guessing the format.

❓ FAQ

1. Does 1,234.50 mean the same thing as 1.234,50?

They can represent the same amount in different number formats. Declare the format before you compare them.

2. Can I compare numbers as plain text?

Compare normalized values, not raw strings, after you have declared the input rules.

3. Is Decimal enough to handle all currency checks?

No. Decimal helps with precision, but it cannot choose rounding rules, interpret tax amounts, or convert currencies.

4. What should I do with a value that does not match the declared format?

Reject it and report it for review. Do not remove punctuation or guess the format.

📝 Summary

Check numbers separately from the words around them, and declare your format rules before comparing values. Keep currency and units as separate fields, and return to the original text to confirm what each figure means.

Try it now: upload a document and get it translated with the layout intact

Updated 2026-11-04