Spotra is a Chrome extension that allows you to easily translate content without losing focus while browsing the web.
Note: The extension is not yet available in the Chrome Web Store.
For those who want to use this extension immediately or contribute to its development, follow the steps below.
- Clone the Github repository to your computer or download it as a ZIP file.
- Open your Chrome browser and click on the three dots in the upper right corner.
- In the menu that opens, go to
Extensions
and click theManage extensions
button. - Enable
Developer mode
option in the upper right corner. - Click
Load unpackaged
and select the client/ directory in the file you downloaded. - After you successfully install the extension, you can start using it by refreshing your active tabs.
Action | MacOS | Other |
---|---|---|
Toggle | ⌘ + " | alt + " |
Swap Languages | ⌘ + shift + " | alt + shift + " |
Instant Copy | ⌘ + enter | alt + enter |
Close | esc | esc |
Due to the ongoing development process, I am currently using the Vercel hobby plan for the server side.
git clone https://github.com/emirhansirkeci/spotra
cd spotra/server
npm install
Execute the API using node index.js
npm run start
or run the API in development mode using nodemon index.js
npm run dev
If you don't have nodemon, install it with the following code.
npm install -g nodemon
POST /translate
text
(string, required): The text to be translated.translateFrom
(string, optional): The source language code (e.g., "en" for English). If not provided, the API will automatically detect the source language.translateTo
(string, required): The target language code (e.g., "es" for Spanish).
Status: 200 OK
{
source: "en",
target: "es",
text: "Hello, World!",
result: "¡Hola, Mundo!"
}
Status: 400 Bad Request
{
code: 400,
message: "Invalid request. Please provide a valid text parameter."
}
Status: 500 Internal Server Error
{
code: 500,
message: "Internal Server Error. Failed to fetch data."
}
Will be updated.
{
Turkish: "tr",
English: "en",
Italian: "it",
German: "de",
Dutch: "nl",
Japanese: "ja",
Korean: "ko",
French: "fr",
Portuguese: "pt",
Russian: "ru",
Spanish: "es",
Swedish: "sv",
};