Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced Custom API with Deep translator api #3 #30

Closed
wants to merge 2 commits into from

Conversation

gauravghodinde
Copy link

Replaced Custom API with Deep Translator API #3
fixes: #3
as mentioned by @Illuminati9 it is not mandatory to use Google API so i used Deep Translator API which is free to use and does not require any auth tokens.

  1. Api used -> https://deep-translator-api.azurewebsites.net/mymemory/
  2. screenshot of fixes (Test)
    chrome-capture-2024-3-17 (3)
  3. no credentials or access tokens are required
  4. As there are no changes that require any tokens or auth keys no need to add anything to documentation

@Illuminati9
Copy link
Contributor

@gauravghodinde , can you share video of text other than hello and can you explain the code that you changed

@gauravghodinde
Copy link
Author

@Illuminati9 this is the code
` final headers = {
'accept': 'application/json',
'Content-Type': 'application/json',
};

final data =
    '{\n  "source": "en",\n  "target": "${lang}",\n  "text": "${text}",\n  "proxies": []\n}';

print(data);

final url =
    Uri.parse('https://deep-translator-api.azurewebsites.net/mymemory/');

final response = await http.post(url, headers: headers, body: data);`

here im simply executing an HTTP post request to the URL

also i found an error in my code i didn't manipulated the string properly before that's the reason it was give hola as an output everytime i have fixed it now

here is the video

translate.mp4

@Illuminati9
Copy link
Contributor

@gauravghodinde , Great work!!!

@Charan0313
Copy link

@gauravghodinde , great work !!

@Charan0313 Charan0313 closed this Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Update] Replace Custom API with Google API
3 participants