{"id":21997722,"url":"https://github.com/osfunapps/os_translator-py","last_synced_at":"2025-03-23T04:45:17.375Z","repository":{"id":98763037,"uuid":"243525916","full_name":"osfunapps/os_translator-py","owner":"osfunapps","description":"Run this module to translate a string to a given language using Google Translate API.","archived":false,"fork":false,"pushed_at":"2021-02-07T14:08:58.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T11:32:29.941Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osfunapps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T13:28:21.000Z","updated_at":"2021-02-07T14:09:00.000Z","dependencies_parsed_at":"2023-05-25T05:30:16.007Z","dependency_job_id":null,"html_url":"https://github.com/osfunapps/os_translator-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_translator-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_translator-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_translator-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_translator-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osfunapps","download_url":"https://codeload.github.com/osfunapps/os_translator-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056902,"owners_count":20553854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T22:17:53.027Z","updated_at":"2025-03-23T04:45:17.370Z","avatar_url":"https://github.com/osfunapps.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduction\n------------\n\nRun this module to translate a string to a given language using Google Translate API.\n\n## Installation\nInstall via pip:\n\n    pip install --upgrade google-cloud-translate\n    pip install os-translator\n    \n## Usage       \n```python    \nimport os_translator.Translator as translator\n\nheb_str = translator.translate_text(\"/path/to/service/account/.json\",\n                                    \"firebaseprojectId\",\n                                    \"What's the time?\",\n                                    language_initials_dest=\"iw\"\n                                    language_initials_src='en-US')\n```                                        \n## Method Signatures\n```python\ndef translate_text(service_account_json_path,\n                   project_id,\n                   text,\n                   language_initials_dest,\n                   language_initials_src='en-US'\n                   ):\n    \"\"\"Will translate a text to a given language\n\n    Parameters:\n    :param service_account_json_path: the path to your google translate api json key. Download from your firebase's project's settings\n    :param project_id: your project id (fetch from your api console project's name: https://console.cloud.google.com/?_ga=2.55756075.1423406147.1582784765-1154152733.1582784765)\n    :param text: the text to translate\n    :param language_initials_dest: the initials of the language you want to translate to\n    :param language_initials_src: the source language\n\n    NOTICE:\n        If there are substrings you don't want to translate, write KEEP before them. Example: \"The boy looks KEEPWord\"\n    \"\"\"\n```\n## Licence\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fos_translator-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosfunapps%2Fos_translator-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fos_translator-py/lists"}