TrendRadarDocsA PROJECT BYsansansansan's personal projects and softwaresandev.cc
HomeDocumentationCommunityPartnershipsIndividual SupportCredits
  • Start here
    • Choose a deployment
    • No server: GitHub Actions
    • Server / NAS: Docker
    • Try locally: Run with uv
    • Configure content & delivery
  • Data Sources
    • Platform Configuration
    • Self-hosted sources (AI)
    • RSS Feed Configuration
  • Content Filtering
    • Keyword Configuration
    • AI Smart Filtering
  • Push Notifications
    • Push Channels
    • Push Modes
    • Scheduling
  • AI Enhancement
    • AI Analysis & Push
    • AI Translation
    • MCP Chat Analysis
    • MCP Query Guide
  • Data & Operations
    • Storage Configuration
    • Config Editor
    • Publish web reports
    • Architecture
  • More
    • FAQ
  1. Docs
  2. /
  3. AI Enhancement
  4. /
  5. AI Translation
PreviousAI Analysis & PushNextMCP Chat Analysis
© TrendRadar·GPL-3.0 License·Website·GitHub·by sansan

AI Translation

The AI Translation feature can translate the pushed content into any language, helping you break down language barriers. Whether you're reading domestic trending news or subscribing to overseas RSS feeds, you can get the content in a language you're comfortable with.

Enabling translation

Add the following configuration in config/config.yaml to turn on translation:
ai_translation:
  enabled: true
  language: "English"  # target language; enter the language you want to translate into
Prerequisites
The AI Translation feature shares its model configuration with the AI analysis feature. Make sure you have already configured api_key in the ai section of config.yaml. If you're already using AI Analysis Push, there's no need to configure extra model parameters — just enable translation.
Environment variable support
Translation settings can also be configured via environment variables: AI_TRANSLATION_ENABLED=true and AI_TRANSLATION_LANGUAGE=English. GitHub Actions users can set these as Secrets without modifying the configuration file.

Supported languages

You can set the language field to any of the common languages below, or enter any other language name:
Language valueDescription
EnglishEnglish
KoreanKorean
JapaneseJapanese
FrenchFrench
SpanishSpanish
GermanGerman
...You can enter any language name, and the AI will attempt to translate into it

Features

FeatureDescription
One-click enableJust set enabled: true and a target language in the configuration file to turn on translation
Smart batch processingWhen translating many titles, requests are automatically batched to reduce API calls and save costs (added in v6.10.0)
Custom translation styleCustomize the translation prompt via the ai_translation_prompt.txt file to adjust the style and tone
Shared model configurationShares the same model configuration as the AI analysis feature — you only need to configure ai.api_key once
Section-level controlYou can control whether translation is enabled for each section independently, such as hot lists, RSS, and standalone pushes
Smart skippingPush sections that are not set to display are automatically skipped during translation, saving token usage

Batch processing mechanism

Since v6.10.0, AI Translation includes a smart batch processing mechanism. When many titles need to be translated, the system automatically sends translation requests in batches, avoiding exceeding the model's limit in a single request while reducing the number of API calls to lower usage costs.
You can adjust batch processing behavior with the following settings:
ai_translation:
  batch_size: 100     # Number of titles sent to the AI per batch (default: 100)
  batch_interval: 2   # Interval in seconds between batches to avoid API rate limits (default: 2)
The default settings are suitable for most scenarios and usually don't need to be changed. If your AI service has stricter rate limits, you can reduce batch_size or increase batch_interval.

Customizing the translation style

If you're not satisfied with the default translation, you can adjust the translation prompt by editing the config/ai_translation_prompt.txt file. For example, you can ask the AI to use more colloquial wording, or to leave certain terms untranslated.
Prompt file format

Section-level translation control

The translation feature supports controlling each push section independently. You can choose to translate only the hot list content, only the RSS content, or only the standalone push section. Sections that are not set to display are automatically skipped, so no tokens are wasted.
ai_translation:
  scope:
    hotlist: false    # Do not translate hot list titles (default: off)
    rss: true         # Translate RSS titles (default: on)
    standalone: true  # Translate standalone section titles (default: on)
Default values for each field: hotlist defaults to false (off), while rss and standalone default to true (on). You can adjust these to suit your needs.
Prerequisite: display.regions must be enabled
Translation requires that the corresponding region is enabled in display.regions. For example, scope.rss=true only takes effect when display.regions.rss=true. If a region's display is turned off, that section will not be translated even if the translation scope is set to true.
A tip for saving tokens
If you only care about one type of push content (for example, only RSS), you can turn off the display of the other sections in the configuration. The translation feature will automatically skip sections that are not displayed, effectively reducing API calls and token consumption.
Extremely low cost
Translating titles consumes very few tokens. With DeepSeek, translating 100 news titles costs less than 0.01 CNY. Even with multiple pushes per day, the monthly translation cost is virtually negligible.

Notes

About translating overseas content
Some overseas media content may involve sensitive topics, and the AI model may refuse to translate such content. When subscribing to RSS feeds, we recommend screening your sources and avoiding feeds that may contain sensitive content.

Recommended RSS feeds

If you're looking for high-quality overseas RSS feeds, the following two open-source projects have curated large lists of high-quality RSS feeds that you can use together with the translation feature:
awesome-tech-rss
A collection of blog RSS feeds about technology, startups, and programming
awesome-rss-feeds
A curated collection of RSS feeds from major news media around the world