slang-coder
Translate selected English text to Hindi in Romanized script directly inside Cursor (or VS Code), powered by Sarvam AI.
Install in Cursor (from VSX/Open VSX)
- Open Cursor.
- Go to Extensions (
Cmd+Shift+X on macOS / Ctrl+Shift+X on Windows/Linux).
- Search for slang-coder.
- Click Install.
If you have a .vsix package instead, open the Extensions view menu (...) and choose Install from VSIX....
First-time setup
On your first translation, the extension asks for your Sarvam AI API subscription key.
- The key is stored securely in the editor's secret storage.
- You normally enter it once and reuse it for future translations.
Get an API key at sarvam.ai.
How to use
- Open any editable file in Cursor.
- Select the English text you want to translate.
- Run Slangcoder: Translate using either:
- Command Palette (
Cmd+Shift+P / Ctrl+Shift+P)
- Keybinding:
Alt+T (only when text is selected)
- The selected text is replaced inline with Romanized Hindi output.
Translation behavior
- Source language: English (
en-IN)
- Target language: Hindi (
hi-IN)
- Script output: Roman (Romanized Hindi, not Devanagari)
- Numerals: International (
0-9)
- Provider: Sarvam AI Translate API
Notes and limitations
- You must select text before running the command.
Alt+T is only active when text is selected and the editor is not in diff mode.
- The extension translates the full selection as one block.
For developers
If you want to run this extension from source:
- Clone the repo and run
npm install.
- Open the project in VS Code/Cursor.
- Press
F5 to launch the Extension Development Host.
| |