app icon
NiuTrans
0.1.0

Text translation using NiuTrans API

jingfelix/niutrans122 installs

dify-plugin-niutrans

Author: jingfelix

Version: 0.1.0

Type: tool

Description

This plugin integrates with the NiuTrans API to provide high-quality text translation services. It supports translating text between various languages, offering automatic source language detection when the source language is not specified.

Tool: translate_text

Functionality:

The tool translates input text from a source language to a target language using the NiuTrans API.

Parameters:

  • (string, required): The text content to be translated.
  • (string, optional, default: ): Source language code (e.g., , , ). If set to , the plugin will auto-detect the source language.
  • (string, required): Target language code (e.g., , , ).

Return Values:
The tool returns a generator that yields:

  1. json: A dictionary with the following keys:
    • (string): The translated text.
    • (string): The detected or specified source language code.
    • (string): The specified target language code.
    • (string): The original input text.
    • (string): Error code if the translation fails (empty string if successful).
    • (string): Error message if the translation fails (empty string if successful).
  2. text: The translated text string.

Setup

  1. To use this plugin, you need to set up the NiuTrans API key. You can get your API key from the NiuTrans website at https://niutrans.com/cloud/api/list .

  2. Fill in the and in the plugin's configuration page.

  3. Enjoy using the plugin for text translation!

[Image blocked: NiuTrans API Key]

[Image blocked: NiuTrans Plugin Configuration]
[Image blocked: NiuTrans Plugin Usage]

Privacy Policy

Please refer to the Privacy Policy [blocked] for details on data collection, processing, and user rights.

CATEGORY
Tool
VERSION
0.1.0
jingfelix·07/29/2025 11:00 AM
REQUIREMENTS
Maximum memory
256MB