def connect(self): 
        try:
            self.connection = pymongo.Connection(self.host, self.port)
            self.db = self.connection[self.name]
        except AutoReconnect:
            raise DatabaseException("It's not possible connect to the database")
def gettext(self, text: str, lang: str = None):
        """
        Singular translations
        """

        if lang is None:
            lang = self.context_lang.get()

        if lang not in self.translations:
            return text

        translator = self.translations[lang]
        return translator.gettext(text)