Content
# Multilingual Localization Translation Tool
This is a localization translation tool based on large language models, capable of automatically processing and translating text content in various localization files (.ts, .js, .json).
## Features
1. Supports multiple file formats
- TypeScript (.ts)
- JavaScript (.js)
- JSON (.json)
2. Intelligent file handling
- Automatically recognizes language codes in files (e.g., en-US, zh-CN)
- Automatically backs up the original files
- Maintains the format and structure of the source files
3. Efficient batch processing
- Supports batch processing of entire directories
- Automatically creates output directory structure
- Concurrently processes multiple files
- Supports single file processing
4. Security features
- Automatic file backup
- Error handling and logging
- Format validation and cleanup
## Usage Instructions
### File Naming Convention
Translation files need to include the language code in the filename, for example:
- messages.en-US.ts
- translations.zh-CN.json
Supported language code formats:
- xx-XX (e.g., zh-CN, en-US)
- xx-xx (e.g., zh-cn, en-us)
### Cursor Configuration Instructions
1. Open Cursor settings
2. Locate MCP configuration
3. Enter the corresponding configuration based on your operating system:
#### Mac Users
```json
{
"mcpServers": {
"transform": {
"command": "node",
"args": [
"{\"apiKey\":\"Your API Key\",\"modelName\":\"The model name you are using\",\"baseUrl\":\"API Base URL\"}"
]
}
}
}
```
#### Windows Users
```json
{
"mcpServers": {
"transform": {
"command": "cmd",
"args": [
"/c",
"node",
"{\"apiKey\":\"Your API Key\",\"modelName\":\"The model name you are using\",\"baseUrl\":\"API Base URL\"}"
]
}
}
}
```
### Notes
1. File Handling
- The original file will be automatically backed up before processing
- Backup file format: `original_filename.backup.timestamp.extension`
- Files that do not conform to the naming convention will be skipped
2. Error Handling
- Failure to process a single file will not affect other files
- The console will output processing status and error messages
3. Performance Optimization
- Large files will be automatically processed in chunks
- By default, a maximum of 500 key-value pairs will be processed per chunk
- Concurrently processing multiple files improves efficiency
4. Path Issues
- Please use absolute paths; relative paths will look for the code execution location
Connection Info
You Might Also Like
Fetch
Model Context Protocol Servers
semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
repomix
Repomix packages your codebase into AI-friendly formats for seamless integration.
Serena
A powerful coding agent toolkit providing semantic retrieval and editing...
Blender
BlenderMCP integrates Blender with Claude AI for enhanced 3D modeling.
pydantic-ai
GenAI Agent Framework, the Pydantic way