The Fluentis Translation Extension for Visual Studio Code assists Fluentis app translators in managing multilingual content efficiently. This tool allows quick translation and lookup of terms in supported languages, providing easy access to an embedded dictionary and integration with an external translation service.
Features
Translate Selected Text: Quickly translate selected text in the editor and replace it with the translation.
Translate Entire Files: Translate the entire content of Markdown or JSON files, preserving formatting.
Lookup Dictionary: Look up alternative translations for selected words or phrases using an embedded dictionary.
Supported Languages
The extension currently supports translation and lookup between:
Romanian
Italian
English
Croatian
The embedded dictionary enables fast offline lookups without needing an API call.
Requirements
Visual Studio Code version 1.94.0 or later.
Dependencies:
Axios: For making API calls to the translation service.
XLSX.js: For loading and parsing the embedded dictionary file (Excel format).
Configuration
Setting Up the Extension
Open Settings: Go to File > Preferences > Settings or use the shortcut Ctrl+,.
Configure Fluentis Translation:
Bearer Token: The authentication token for accessing the external translation API.
Service URL: The endpoint URL of the translation API (e.g., https://translationservice.fly.io/translate).
Source Language: Select the language for the original text.
Target Language: Select the language to translate to (e.g., English, Romanian, Italian, Croatian).
Usage Instructions
1. Fluentis: Translate Selected Text
In Editor:
Select any text in the editor.
Right-click and choose Fluentis: Translate.
The selected text will be replaced with its translation.
In Explorer:
Right-click on a Markdown or JSON file in the Explorer.
Choose Fluentis: Translate to translate the entire file content and save the changes automatically.
2. Fluentis: Lookup Dictionary
Editor Context:
Select a word or phrase in the editor.
Right-click and choose Fluentis: Lookup Dictionary.
A Quick Pick list will display possible translations from the dictionary. Selecting an option will replace the selected text with the chosen translation.
Commands
Command
Context
Description
Fluentis: Translate
Editor, Explorer
Translates selected text or the entire file content (Markdown or JSON).
Fluentis: Lookup Dictionary
Editor
Displays possible dictionary translations for selected text, allowing quick replacement.