-
Notifications
You must be signed in to change notification settings - Fork 23
Description
I tried to use the openoffice_en backend in french by using the files provided by libreoffice. It works but I need to keep the 'en' in tq_language list:
with this configuration, only online thesaurus are used
let g:tq_language=['fr']
let g:tq_openoffice_en_file="/usr/share/mythes/th_fr_FR_v2"
let g:tq_enabled_backends=["openoffice_en", "cnrtl_fr", "synonymo_fr"]a workaround is to add 'en' the the language list and only french backend
both libreoffice and online thesaurus are workings
let g:tq_language=['en', 'fr']
let g:tq_openoffice_en_file="/usr/share/mythes/th_fr_FR_v2"
let g:tq_enabled_backends=["openoffice_en", "cnrtl_fr", "synonymo_fr"]but it become complicate if I want to have english and french backend activated and switch language by modifying tq_language option.
where I have to change, the language, the openoffice_file and the backend options. I tried
let b:myLang==0
function! ToggleThesaurus()
if b:myLang==0
let g:tq_language=['en', 'fr']
let g:tq_openoffice_en_file="/usr/share/mythes/th_fr_FR_v2"
let g:tq_enabled_backends=["openoffice_en", "cnrtl_fr", "synonymo_fr"]
b:gyLang=1
else
let g:tq_language=['en']
let g:tq_openoffice_en_file="/usr/share/mythes/th_en_US_v2"
let g:tq_enabled_backends=["openoffice_en", "mthesaur_txt", "datamuse_com"]
b:gyLang=0
endif
endfunctionbut if the switch works for the libreoffice thesaurus, the plugin only use the first backend list.
In this example, I am able to use the three french thesaurus backend but switching to english use only openoffice_en one.
If I enable all backend before the function, in french, I'll get answer from all backend in french and in english.