Support for multiple languages.
Google Bard currently only supports English, Japanese, and Korean languages for its services. However, I have made adjustments to enable the usage of Google Bard in other languages as well by utilizing python package googletrans
To achieve this, I have added an additional step to the process. When a language is specified as an argument, it will be first translated into English using Google Translate. Then, the response in English will be translated back into the user's specified language.
This modification allows users to use Google Bard in languages other than English, Japanese, and Korean.
Other languages
To detect and translate using the Google Bard in unofficial languages, the Python package googletrans is utilized.
from bardapi import Bard
token = 'xxxxxxx'
bard = Bard(token=token, language='arabic')
res = bard.get_answer("هل تعرف الكيمتشي")