Dushistov / sdcv

https://dushistov.github.io/sdcv/
GNU General Public License v2.0
289 stars 42 forks source link

Is it possible to translate a sentence instead of single word? #54

Closed sihunqu123 closed 4 years ago

sihunqu123 commented 4 years ago

For example to translate 'How are you' -> '你好' 'How are you' -> 'こんにちわ'

Dushistov commented 4 years ago

@sihunqu123

Is it possible to translate a sentence instead of single word?

Not in robust way, you obviously can create script for that:

#!/bin/bash

unset SDCV_PAGER
for i in $1; do
        sdcv $i;
done | less

and it translate whole sentence like 'How are you', but it will be just bunch of dictionary articles, because of it is dictionary software, not translation software.

sihunqu123 commented 4 years ago

Got it. Seems like this is not the solution for my case, thanks anyway. BTW, there is some software that does works offline to translate sentences, but that's only in GUI, and they don't expose the sentence-tranlsating API. So seems like I have to resort to a online-sentence-translator.