Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Langgenius Dify I18n Dataset Documents Translations

From Leeroopedia


Knowledge Sources
Domains Internationalization, Frontend
Last Updated 2026-02-08 00:00 GMT

Overview

Concrete i18n translation bundle providing localized UI strings for the dataset-documents section of the Dify frontend.

Description

This translation namespace contains all user-facing strings for the Knowledge Base document management interface, including embedding status and processing controls (pause, resume, stop), document list actions (add, archive, delete, download, sync, upload), batch operations (CSV import, batch add chunks), document status indicators (available, disabled, archived, indexing, queuing, error, paused), document table headers, sort options, document metadata labeling (book, business document, personal document, paper, web page, social media post, IM chat, Wikipedia entry, GitHub, Notion metadata fields), language maps, document type selection, and chunk/segment management (add, edit, delete, search, keyword management, parent-child chunk structure, Q&A segments, regeneration controls). The bundle is a flat JSON key-value map where keys use dot-delimited hierarchical naming (e.g., "metadata.field.book.author") and values are the translated strings, optionally containing Template:Interpolation placeholders.

The canonical (source-of-truth) locale is en-US. All other locales mirror the same key structure with translated values.

Usage

Import translation keys from this namespace via the i18next hook:

import { useTranslation } from 'react-i18next'

const { t } = useTranslation()
t('datasetDocuments.metadata.field.book.author')  // Returns localized string

Code Reference

Source Location

Locale Variants

Locale File Lines
en-US web/i18n/en-US/dataset-documents.json 339
fa-IR web/i18n/fa-IR/dataset-documents.json 339
fr-FR web/i18n/fr-FR/dataset-documents.json 339
ro-RO web/i18n/ro-RO/dataset-documents.json 339
th-TH web/i18n/th-TH/dataset-documents.json 339
vi-VN web/i18n/vi-VN/dataset-documents.json 339
zh-Hant web/i18n/zh-Hant/dataset-documents.json 339

Key Structure

The canonical en-US file contains 337 translation keys organized under the following top-level prefixes:

Prefix Description Example Key
embedding Embedding/processing status and controls "embedding.completed", "embedding.processing", "embedding.mode"
list Document list, actions, batch operations, status, table headers "list.title", "list.action.delete", "list.status.available"
metadata Document metadata: types, fields, categories, languages, sources "metadata.title", "metadata.field.book.author", "metadata.type.paper"
segment Chunk/segment management: add, edit, search, keywords, parent-child "segment.addChunk", "segment.editChunk", "segment.keywords"
{
  "embedding.completed": "Embedding completed",
  "embedding.processing": "Embedding processing...",
  "embedding.mode": "Chunking Setting",
  "embedding.highQuality": "High-quality mode",
  "embedding.economy": "Economy mode",
  "embedding.hierarchical": "Parent-child",
  "list.title": "Documents",
  "list.action.add": "Add a chunk",
  "list.action.delete": "Delete",
  "list.action.sync": "Sync",
  "list.status.available": "Available",
  "list.status.indexing": "Indexing",
  "list.table.header.fileName": "NAME",
  "list.batchModal.title": "Batch add chunks",
  "metadata.title": "Metadata",
  "metadata.field.book.author": "Author",
  "metadata.field.book.title": "Title",
  "metadata.field.paper.DOI": "DOI",
  "metadata.type.book": "Book",
  "metadata.type.paper": "Paper",
  "metadata.type.webPage": "Web Page",
  "metadata.languageMap.en": "English",
  "metadata.source.local_file": "Local File",
  "segment.addChunk": "Add Chunk",
  "segment.editChunk": "Edit Chunk",
  "segment.keywords": "KEYWORDS",
  "segment.childChunk": "Child-Chunk",
  "segment.parentChunk": "Parent-Chunk",
  "segment.hitCount": "Retrieval count"
}

Import

// Keys from this namespace are accessed via useTranslation
import { useTranslation } from 'react-i18next'

I/O Contract

Inputs

Name Type Required Description
key string Yes Dot-delimited translation key (e.g., "metadata.field.book.author")
interpolation Record<string, string> No Values for Template:Placeholder replacements

Outputs

Name Type Description
translated string string The localized string for the current locale

Usage Examples

import { useTranslation } from 'react-i18next'

function MyComponent() {
  const { t } = useTranslation()

  return <span>{t('datasetDocuments.list.title')}</span>
}
// Accessing metadata field labels
function MetadataLabel() {
  const { t } = useTranslation()

  return (
    <label>{t('datasetDocuments.metadata.field.book.author')}</label>
  )
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment