A brief overview of the translation tool project, explaining that it is a simple tool designed to translate text from one language to another using the googletrans library. It mentions that the tool allows users to input text, specify source and target languages, and get translations along with Romanization for supported languages.
-
Clone the repository:
git clone https://github.com/your-/translation-tool](https://github.com/inshh04/CodeAlpha_LanguageTranslationTool_InshaNadeem.git
-
Navigate to the project directory: cd CodeAlpha_LanguageTranslationTool_InshaNadeem
-
Install the required dependencies: pip install googletrans==4.0.0-rc1
- Run the script
- Enter the text you want to translate.
- Enter the source language code (e.g., en for English).
- Enter the target language code (e.g., es for Spanish).
- The translated text and its Romanized form (if available) will be displayed.
- You will be asked if you want to translate another text. Type yes to continue or any other key to exit.
Enter the text to be translated: Hello, world!
Available languages and their codes:
af: afrikaans sq: albanian am: amharic ar: arabic hy: armenian az: azerbaijani eu: basque be: belarusian bn: bengali bs: bosnian bg: bulgarian ca: catalan ceb: cebuano ny: chichewa zh-cn: chinese (simplified) zh-tw: chinese (traditional) co: corsican hr: croatian cs: czech da: danish nl: dutch en: english eo: esperanto et: estonian tl: filipino fi: finnish fr: french fy: frisian gl: galician ka: georgian de: german el: greek gu: gujarati ht: haitian creole ha: hausa haw: hawaiian iw: hebrew hi: hindi hmn: hmong hu: hungarian is: icelandic ig: igbo id: indonesian ga: irish it: italian ja: japanese jw: javanese kn: kannada kk: kazakh km: khmer ko: korean ku: kurdish (kurmanji) ky: kyrgyz lo: lao la: latin lv: latvian lt: lithuanian lb: luxembourgish mk: macedonian mg: malagasy ms: malay ml: malayalam mt: maltese mi: maori mr: marathi mn: mongolian my: myanmar (burmese) ne: nepali no: norwegian or: odia ps: pashto fa: persian pl: polish pt: portuguese pa: punjabi ro: romanian ru: russian sm: samoan gd: scots gaelic sr: serbian st: sesotho sn: shona sd: sindhi si: sinhala sk: slovak sl: slovenian so: somali es: spanish su: sundanese sw: swahili sv: swedish tg: tajik ta: tamil te: telugu th: thai tr: turkish uk: ukrainian ur: urdu ug: uyghur uz: uzbek vi: vietnamese cy: welsh xh: xhosa yi: yiddish yo: yoruba zu: zulu
Enter the source language code: en Enter the target language code: zh-cn
Translated text: 你好,世界! Romanized text: Nǐ hǎo, shìjiè!
Do you want to translate another text? (yes/no): yes
Enter the text to be translated: How are you?
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature/your-feature-name).
- Make your changes and commit them (git commit -m 'Add some feature').
- Push to the branch (git push origin feature/your-feature-name).
- Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Insha Nadeem - Initial work - Insha Nadeem's GitHub profile
Thanks to the creators of the googletrans library. Inspired by various online translation tools.