Skip to content

Multilanguage support #103

@janvarev

Description

@janvarev

Feature request

Increase effitiency of system by translating input and output data to user language.

What we need?

  • Translate input fragments from UserLang to English
  • Translate output fragments to UserLang (if needed)

So, engine will proceed search on English (correctly), but input/output will be translated

Motivation

I need to efficiently index docs on my native language.

Your contribution

I recommend to use this compact function from my project: https://github.com/janvarev/kobold_api_multilang_proxy/blob/main/server.py#L25

def translator_main(string,from_lang:str,to_lang:str) -> str:

It allow to translate strings using GoogleTranslator from deep_translator lib (standart, no special processing required)
or using my project OneRingTranslator (REST translation server setup required). OneRingTranslator will allow user to choose engine for translation and even translate locally with Meta NLLB neuronet.

Default settings for user can be easy:

  • UserLang=en
  • TranslationEngine=GoogleTranslate

If we call translator_main("string","en","en") string will just return unchanged. So, it will no changes for user who don't want to use translations in their project (by default).

If user want to change, he can change UserLang and TranslationEngine option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions