PythonTranslate.py | A Python3.6.x-wrapper to translate your strings <3

in #utopian-io8 years ago (edited)

Repository

https://github.com/Divirad/PythonTranslate

PythonTranslate.py


The Project

What is this project about?

Yesterday i found a very cool free API from yandex.com (some real cool russian developer). So i decided to write a little wrapper for it to use it in future projects. The API supports language-detection, translations and so the wrapper.
Its just a wrapper for this API, nothing big, but i hope its powerful and helps you with some projects.
Maybe a webpage where posts on the steem blockchain can be translated? ;)

Technology Stack

Here a quick list of libraries and stuff i used :)

  • Python3.6.x
    • urllib (should be installed with Python)
  • translate.yandex.com

Roadmap

My future plans are :
Maybe some translating chat-bots, maybe on Telegram, Skype... we will see :D
And i should handle the errors with exceptions. Its nothing big and not my main-project :) Feel free to use it! :D

How to contribute?

Just fork it like its hot and make pull requests! :D If you have some issues post them into the issues-board.
Feel free to contact me on Telegram @kurodevs if you need help :)


Lil Quick Documentation

How to use it?

First you have to get an Api-Key from this Site

Get API Key

Keep in mind that it's not safe to upload your API-Key publicly on Github.
I recommend you to save it in an private.py file to import it locally into your project.

private.py
# DONT UPLOAD TO GITHUB
APIKEY = "<your key here>"

After that create an object in your file where you want to translate something.

main.py
from pythontranslate import Translator
from private import APIKEY

translator = Translator(APIKEY) 

Methods:

Get Supported Languages
Detect Languages
Translate
Examples

GitHub Accounts

https://github.com/PonySchreck
https://github.com/Divirad

Sort:  

Your contribution has been evaluated according to Utopian rules and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post,Click here

A couple of feedbacks:

  • You should make this code a library and share at python package index. That way, other developers looking to use a yandex translate api, can just install it via pip install <package_name>.

  • Utopian expects a good formatting, language, and presentation on contributions on every category. Your post has a room for improvement on this topics. This directly effects your contribution's score, so better present the project in a good format. :)

  • We expect a clear GIT history with understandable commit messages. I know that's a new project but keep in mind for future submissions.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

thanks for this quick response. That helps me alot :) I will pay attention to this points on my next post. This was my first utopian-io project and I will try to make it better next time! Thanks for this detailed feedback! :3

Hey @emrebeyler
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

Contributing on Utopian
Learn how to contribute on our website.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hey @kurodevs
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.080
BTC 62814.07
ETH 1666.58
USDT 1.00
SBD 0.42