Skip to content
HALOWERK

Textwerk

i18n key diff

Flattens nested resources to dotted keys (Rails-style YAML with a root locale key is unwrapped automatically) and compares every target locale with the base: missing keys, keys that no longer exist in the base, empty values, values identical to the base (possible untranslated text), type mismatches and placeholder mismatches (printf, ICU, mustache, ${}). With plural_style i18next, keys ending in _zero/_one/_two/_few/_many/_other (and _ordinal_) are grouped and checked against the CLDR.

POST https://text.halowerk.com/v1/i18n-key-diff

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
baseobjectYesBase (source) locale resource.
targetsarrayYesTranslated resources to compare.
formatstringNoFormat of string contents.
plural_stylestringNoi18next groups keys with _one/_other/… (and _ordinal_…) suffixes as plural forms.
max_itemsintegerNoMaximum listed items per category and locale.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "base",
    "targets"
  ],
  "properties": {
    "base": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "locale",
        "content"
      ],
      "description": "Base (source) locale resource.",
      "properties": {
        "locale": {
          "type": "string",
          "maxLength": 35,
          "description": "BCP 47 locale of the base file."
        },
        "content": {
          "anyOf": [
            {
              "type": "object"
            },
            {
              "type": "string",
              "maxLength": 250000
            }
          ],
          "description": "Resource as object, or file content as string (see format)."
        }
      }
    },
    "targets": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "description": "Translated resources to compare.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "locale",
          "content"
        ],
        "properties": {
          "locale": {
            "type": "string",
            "maxLength": 35,
            "description": "BCP 47 locale of this file."
          },
          "content": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "string",
                "maxLength": 250000
              }
            ],
            "description": "Resource as object, or file content as string (see format)."
          }
        }
      }
    },
    "format": {
      "type": "string",
      "enum": [
        "json",
        "yaml",
        "properties"
      ],
      "default": "json",
      "description": "Format of string contents."
    },
    "plural_style": {
      "type": "string",
      "enum": [
        "i18next",
        "none"
      ],
      "default": "i18next",
      "description": "i18next groups keys with _one/_other/… (and _ordinal_…) suffixes as plural forms."
    },
    "max_items": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "default": 500,
      "description": "Maximum listed items per category and locale."
    }
  }
}

Open original schema

Published input example

{
  "base": {
    "locale": "en",
    "content": {
      "greeting": "Hello {{name}}",
      "items_one": "{{count}} item",
      "items_other": "{{count}} items"
    }
  },
  "targets": [
    {
      "locale": "ru",
      "content": {
        "greeting": "Привет {{name}}",
        "items_one": "{{count}} предмет",
        "items_other": "{{count}} предмета"
      }
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →