The i18n Translator Plugin is a tool designed for developers to streamline and accelerate the translation process of internationalization (i18n) resource files. By integrating the powerful language capabilities of ChatGPT, this plugin enables the one-click translation of resource files, significantly improving development efficiency and shortening the timeline for project internationalization.
Features
Rapid Translation: Translate entire resource files with a single click, eliminating the need for manual, line-by-line translation.
High-Quality Translations: Utilizes ChatGPT's advanced language models to ensure translations are accurate and natural-sounding.
Customizable Prompts: Users can customize prompts to meet specific translation requirements and preferences, allowing for tailored translations that better fit the context and intent of the original text.
How It Works
Tool Command: Select your locale file in VS Code, run the plugin command to translate
Confirm Source: Auto detect all your local files in current folder, select your source language
Configuration: The plugin will detect all locale files in current folder
Translation: Click language translate button to go
Default Prompt
parameters:
source: the source language
target: the target language
input: the input json, will be split to small chunk. so it could support any large file as well
sure, you can customize prompt, we recommend to use gpt-4 for better quality.
The following is a piece of JSON where the values are strings in the {source} language.
please remember the json is i18n locale file, please don't translate placeholder.
{input}
Please translate the values into {target} language without altering the keys of the JSON object.
Response the json result, nothing else.