Skip to content

translate

Translates ARB files using the TransFlow translation API. This command reads an ARB file, translates all text values to the target language, and generates a new ARB file with the translated content.

  • -f, --file <FILE>: Path to input ARB file (required)
  • -t, --target <LANG>: Target language code, e.g., fr, es, de, ja (required)
  • -o, --output <OUTPUT>: Output ARB file path (defaults to app_{target}.arb)
  • --api-url <URL>: TransFlow API endpoint URL (defaults to https://transflow.online/api/v2/translate)
  • --api-key <KEY>: TransFlow API key for authentication (optional if saved via set-api-key)
  • --verbose: Show progress during translation
  • --test-api: Test API connection without translating
Terminal window
# Translate to French (uses saved API key if available)
transflow-cli translate -f app_en.arb -t fr
# Translate to Spanish with custom output name
transflow-cli translate -f app_en.arb -t es -o app_es.arb
# Translate using custom API endpoint
transflow-cli translate -f app_en.arb -t de --api-url https://transflow.online/api/v2/translate
# Translate with explicit API key
transflow-cli translate -f app_en.arb -t ja --api-key your-api-key --verbose
# Test API connection
transflow-cli translate -f app_en.arb -t fr --test-api