CLICLItypeA command you run, rather than a dependency you import.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

@concircle/i18n-ai-translator

A CLI that translates a UI5 app's i18n.properties with OpenAI and writes the language files back, masking placeholders, applying a glossary and caching what has been translated.

A UI5 app ships its texts as i18n.properties, and every further language is another file somebody fills in by hand or sends out to be translated. This reads the base bundle and writes i18n_de.properties and its siblings back into the project, in missing mode for the keys with no text yet or overwrite for all of them. It masks the placeholders before sending the text to the model and validates that they are still present afterwards, and a glossary of shared and per-language terms sets a term's target word, Order to Auftrag in its own example. A local cache keyed on the provider, the model, the two languages and the source value holds what has been translated, so it is the text rather than the property key that decides whether a request repeats. It installs as a devDependency and runs as i18n-ai-translator from an npm script, or as a Translator class and a translateProject helper from Node; OpenAI is the only provider the configuration takes, and the key comes from OPENAI_API_KEY or the config file.

Facts

Latestv0.1.4ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
LocalizationUI5LocalizationcapabilityServing labels, messages and translated content per user locale, including translatable model elements and per-tenant text overrides.

Who is behind it

ConcircleConcircleOrganisationMaintains this
In the atlas: maintains 1
@concircle
Herbert KaintzHerbert KaintzPersonMaintains this
In the atlas: maintains 1, contributes to 1
@hkaintz
maintainers

What it declares

Every artifact

Type
CLI
Origin
Independently maintained
Runtime
Node.js

As a CLI

Distributed through
npm

Connections1

Install

npm add @concircle/i18n-ai-translator

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from concircle/i18n-ai-translator under MIT, read
concircle/i18n-ai-translator/README.mdOn GitHub

@concircle/i18n-ai-translator

Concircle logo Translates UI5 i18n.properties files with OpenAI, preserves placeholders, supports glossary terms, and writes language-specific .properties files.

Features

  • Preserves placeholders like {0}, {name}, %s, ${variable}, and %1$s
  • Supports missing and overwrite translation modes
  • Applies shared and language-specific glossary terms
  • Writes UI5-style language files such as i18n_de.properties
  • Supports optional Unicode escaping with per-language overrides
  • Uses a local cache to avoid repeated translation requests

Installation

npm install --save-dev @concircle/i18n-ai-translator

CLI

Example package.json script:

{
  "scripts": {
    "i18n:translate": "i18n-ai-translator --input ./webapp/i18n/i18n.properties --languages de,fr --mode missing"
  }
}

Show CLI help:

npx i18n-ai-translator --help

Enable Unicode escaping:

{
  "scripts": {
    "i18n:translate": "i18n-ai-translator --input ./webapp/i18n/i18n.properties --languages de,fr --mode missing --encode-unicode"
  }
}

Configuration

Example i18n-ai.config.json:

{
  "sourceLanguage": "en",
  "targetLanguages": ["de", "uk"],
  "translationMode": "missing",
  "encodeUnicode": false,
  "languageOptions": {
    "de": { "encodeUnicode": true },
    "uk": { "encodeUnicode": false }
  },
  "provider": "openai",
  "providerOptions": {
    "apiKey": "sk-...",
    "model": "gpt-4.1-mini",
    "temperature": 0,
    "maxOutputTokens": 4000
  },
  "files": {
    "input": "./webapp/i18n/i18n.properties"
  },
  "cache": {
    "enabled": true,
    "ttlMs": 604800000
  },
  "batchSize": 20,
  "verbose": false
}

Supported top-level config fields:

interface TranslatorConfig {
  sourceLanguage?: string;
  targetLanguages: string[];
  translationMode?: 'missing' | 'overwrite';
  encodeUnicode?: boolean;
  languageOptions?: Record<string, { encodeUnicode?: boolean }>;
  provider?: 'openai';
  providerOptions?: {
    apiKey?: string;
    model?: string;
    baseURL?: string;
    organization?: string;
    temperature?: number;
    maxOutputTokens?: number;
  };
  files?: {
    input?: string;
    outputDir?: string;
    languageFilePattern?: string;
  };
  glossary?: GlossaryConfig | string;
  cache?: {
    enabled?: boolean;
    ttlMs?: number;
    dir?: string;
  };
  rules?: string[];
  batchSize?: number;
  verbose?: boolean;
}

Glossary

Example glossary file:

{
  "shared": [
    {
      "source": "Order",
      "target": "Auftrag",
      "context": "SAP sales document"
    }
  ],
  "languages": {
    "de": [
      {
        "source": "Plant",
        "target": "Werk"
      }
    ],
    "uk": [
      {
        "source": "AI",
        "target": "ШI"
      }
    ]
  }
}

Programmatic Usage

Translate a file directly:

import { Translator } from '@concircle/i18n-ai-translator';

const translator = new Translator({
  sourceLanguage: 'en',
  targetLanguages: ['de'],
  translationMode: 'missing',
  provider: 'openai',
  providerOptions: {
    apiKey: process.env.OPENAI_API_KEY
  },
  files: {
    input: './webapp/i18n/i18n.properties'
  }
});

const result = await translator.translateFile();
console.log(result);

Load config from file:

import { Translator } from '@concircle/i18n-ai-translator';

const translator = await Translator.fromConfig({
  configPath: './i18n-ai.config.json'
});

const result = await translator.translateProject();
console.log(result);

Use the top-level helper:

import { translateProject } from '@concircle/i18n-ai-translator';

const result = await translateProject({
  inputPath: './webapp/i18n/i18n.properties',
  languages: ['de'],
  dryRun: true
});

console.log(result);

Translation Modes

  • missing: only translates keys that are missing or empty in the target file
  • overwrite: retranslates all keys from the source file

Placeholder Handling

The translator masks placeholders before sending text to the model and validates that they are still present afterwards.

Supported placeholder styles:

  • {0}, {1}
  • {name}, {email}
  • %s, %d
  • %1$s, %2$d
  • ${variable}

Output Files

By default, UI5-style language files are generated next to the source file:

  • i18n.properties
  • i18n_de.properties
  • i18n_fr.properties

You can override the output directory or file naming pattern in files.outputDir and files.languageFilePattern.

Cache

Caching is enabled by default. Cache keys include:

  • provider
  • model
  • source language
  • target language
  • source value
  • glossary terms
  • translation rules

Default cache location:

~/.i18n-ai-translator-cache/

Environment Variables

Supported environment variables:

export OPENAI_API_KEY=sk-...
export OPENAI_MODEL=gpt-4.1-mini

Examples

See examples/ for small runnable examples:

Development

npm run build
npm run lint
npm test

License

MIT © 2026 Herbert Kaintz - Concircle

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

MIT, read

History

Latest

v0.1.0-beta.1

Features 10, Docs 4

Notes
Added
  • Initial beta release of @concircle/i18n-ai-translator
  • OpenAI-powered translation for UI5 i18n.properties files
  • Placeholder preservation ({0}, {name}, %s, ${var}, etc.)
  • Glossary/Vocabulary support for domain-specific terms (e.g., SAP context)
  • Optional caching system with TTL and glossary hash invalidation
  • Batch-parallelized translation requests (up to 10 parallel)
  • Extensible AI Provider architecture for future support (Claude, Gemini, etc.)
  • Dual-output: CJS (.cjs) and ESM (.mjs) with TypeScript declarations
  • Comprehensive test suite with placeholder preservation tests
  • Full npm publishing support with quality gates
Documentation
  • README.md with installation and quick start guide
  • API documentation and configuration reference
  • Contributing guidelines for community contributions
  • Security policy for responsible disclosure
16downloads per week, npm
Weekly downloads for @concircle/i18n-ai-translator26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 16.20 Apr – 26 Apr: 2127 Apr – 3 May: 144 May – 10 May: 3411 May – 17 May: 1418 May – 24 May: 2825 May – 31 May: 351 Jun – 7 Jun: 148 Jun – 14 Jun: 1815 Jun – 21 Jun: 4222 Jun – 28 Jun: 2029 Jun – 5 Jul: 426 Jul – 12 Jul: 2213 Jul – 19 Jul: 820 Jul – 26 Jul: 1227 Jul – 2 Aug: 13 Aug – 9 Aug: 1610 Aug – 16 Aug: 1317 Aug – 23 Aug: 724 Aug – 30 Aug: 1431 Aug – 6 Sept: 227 Sept – 13 Sept: 514 Sept – 20 Sept: 921 Sept – 27 Sept: 328 Sept – 4 Oct: 75 Oct – 11 Oct: 1112 Oct – 18 Oct: 16
Localization
  1. abap_btocs_deeplDeepL translation plugin for the B-Tocs ABAP SDKfrom ABAP
  2. abap_btocs_libtrlLibreTranslate plugin for the B-Tocs ABAP SDKfrom ABAP
  3. SAP Translation HubTranslation service for software texts and documentsfrom BTP/BAIP
  4. com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versionsfrom CAP
  5. ABAP_DeepL_clientABAP client for the DeepL translation servicefrom ABAP
  6. LISAMCP server for reading and writing ABAP object translationsfrom ABAP
  7. ABAP_TRANSLATION_HUBReport pushing ABAP objects to SAP Translation Hub and backfrom ABAP
  8. abap-form-translatorRuntime translation layer for SAP form labels, kept in a tablefrom ABAP
  9. ui5-i18n-excel-converterCLI converting UI5 i18n properties files to Excel and backfrom UI5
  10. ZOTR_UTILITYABAP framework reading texts from SAP's online text repositoryfrom ABAP
  11. ZABAP_TRANSLATIONSExcel export and import of ABAP package or program textsfrom ABAP
  12. @sap/cdsCAP Node.js runtimefrom CAP
  13. @sap-ux/i18nReader and writer for i18n bundles of UI5 or CAP projectsfrom UI5
  14. XLF TranslatorEditor for the translations in an uploaded XLIFF filefrom ABAP

Details

Sources4
bestofui5discovered here, bestofui5-data, sources.jsonchecked
npm registry, @concircle/i18n-ai-translatorversion, releases, installschecked
github.com/git+https://github.com/concircle/i18n-ai-translator.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
latestv0.1.4
first release
releases and cadence5, ~0d median
discovered viabestofui5 · bestofui5-data, sources.json
first seen in the atlas
ecosystem and domainui5, developer-experience
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:concircle-i18n-ai-translator
JSON
/artifacts/concircle-i18n-ai-translator.json
MCP
Connecting an agent