Is it possible to translate words via terminal?












28















I would like to translate words from English to Language X trough terminal




  • If it is possible, what kind of dictionaries there are?


  • Is it possible to use online services like webxicon.org trough terminal?











share|improve this question


















  • 1





    See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

    – Mitch
    Nov 22 '13 at 20:24
















28















I would like to translate words from English to Language X trough terminal




  • If it is possible, what kind of dictionaries there are?


  • Is it possible to use online services like webxicon.org trough terminal?











share|improve this question


















  • 1





    See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

    – Mitch
    Nov 22 '13 at 20:24














28












28








28


11






I would like to translate words from English to Language X trough terminal




  • If it is possible, what kind of dictionaries there are?


  • Is it possible to use online services like webxicon.org trough terminal?











share|improve this question














I would like to translate words from English to Language X trough terminal




  • If it is possible, what kind of dictionaries there are?


  • Is it possible to use online services like webxicon.org trough terminal?








command-line dictionary translation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '13 at 16:54









np8np8

89921018




89921018








  • 1





    See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

    – Mitch
    Nov 22 '13 at 20:24














  • 1





    See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

    – Mitch
    Nov 22 '13 at 20:24








1




1





See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

– Mitch
Nov 22 '13 at 20:24





See if this vitobotta.com/google-translate-terminal/#sthash.pH5CSCI5.dpbs helps.

– Mitch
Nov 22 '13 at 20:24










7 Answers
7






active

oldest

votes


















30














For offline use:



You can install dictd server and use Freedict Dictionary database for word translations.



Install dictd:



sudo apt-get install dictd


dictd



Install translation database. eg. dict-freedict-eng-fra for English to French translation, dict-freedict-eng-spa for English to Spanish translation.



sudo apt-get install dict-freedict-eng-fra
sudo apt-get install dict-freedict-eng-spa


freedictDB



Usage:



View list of databases:



dict -D


Use a particular database eg. for English to Spanish translation:



dict -d fd-eng-spa "how are you?"


snapHowRU



For online use:



Install libtranslate-bin with:



sudo apt-get install libtranslate-bin


eg. using online google translate engine:



echo "what are you doing" | translate-bin -s google -f en -t fr


onlineGoogleTranslate






Offline English dictionary in Terminal:



Installing English dictionary databeses (gcide, wn, devil):



sudo apt-get install dict-gcide
sudo apt-get install dict-wn
sudo apt-get install dict-devil


Installing English Thesaurus database (moby-thesaurus):



sudo apt-get install dict-moby-thesaurus


Usage:





  1. Using a particular database (eg. WordNet - wn):



    dict -d wn "dictionary"



  2. Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.



    dict "dictionary"







share|improve this answer


























  • Is there a eng-eng dictionary?

    – user224082
    Dec 24 '13 at 20:26






  • 1





    @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

    – precise
    Dec 25 '13 at 3:59






  • 1





    Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

    – user224082
    Dec 25 '13 at 4:02













  • No definitions found for "how are you?"

    – FireInTheSky
    Oct 6 '18 at 2:41











  • does not work . thumb down

    – FireInTheSky
    Oct 6 '18 at 2:52



















10














Translate Shell



Translate Shell (ex Google Translate CLI) is a tool that lets you use translate text from the command line using Google Translate.



Installation



$ wget git.io/trans
$ chmod +x ./trans


Or



sudo apt install translate-shell


Or



$ git clone https://github.com/soimort/translate-shell
$ cd translate-shell/
$ make
$ [sudo] make install


Usage



To translate



trans en:de "The quick brown fox jumps over the lazy dog"  # Translate to German (de)
trans es: "Igualdad, fraternidad y libertad" # From Spanish to your `locale`
trans :fr "Igualdad, fraternidad y libertad" # From your `locale` to French
trans -b :fr "Igualdad, fraternidad y libertad" # Same but `-brief`


As a dictionary: Google Translate can be used as a dictionary when lang from==to or -d parameter is used



trans -d fr: mot


Additional information and some examples can be found in the official site






share|improve this answer


























  • make: *** No rule to make target 'install'. Stop.

    – FireInTheSky
    Oct 6 '18 at 2:44











  • wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

    – FireInTheSky
    Oct 6 '18 at 2:50











  • does not work , thumb down

    – FireInTheSky
    Oct 6 '18 at 2:51



















4














Depending on the language you want, check out Apertium for offline machine translation through the terminal. It seems to focus mostly on Romance languages (ES, FR, PT, CAT, OCC..), but looks like they are slowly adding various new languages.



For Spanish you would install:



sudo apt install apertium apertium-en-es

echo "Hola Mundo." | apertium -a es-en
> Hello world.


It's terminal based but there's also a basic GUI: apertium-tolk



The version in the repos is older, if you want a newer version follow the install instructions.






share|improve this answer

































    2














    I wrote a simple command-line translator base on google translate using Python.



    The code: The python code is less than 100 lines, and I also wrote an installer script, and provide a config file so that could set your default preferred language.



    It's under MIT license.



    Pre-requisites: Python2.x on Linux, is all it needs, it don't support python3 yet, I might fix this later.






    share|improve this answer

































      1














      Have a look at sdcv based answer here (It also has "Xlanguage" to "Ylanguage" dictionaries):



      Is there an offline command-line dictionary?



      Should also check surfraw. Once you install, you may get meaning of a word through sr webster difficultWord. One way to translate will be through sr google difficultword in hindi.There will probably be other options for translation as well.






      share|improve this answer

































        1














        Translate "life" to portuguese. Example bellow: (lynx must be installed)



        lynx -source 'http://translate.google.com/translate_t?langpair=en|pt&text='life |awk {'print $852'} | cut -d = -f5 |cut -d ';' -f1 |awk 'NF>0'


        Where, "en" is english and "pt" is portuguese



        Output:
        'vida'






        share|improve this answer































          0














          I have written a simple command-line translator based on text files. It also reproduces an audio file if it exists. I already have a database of audio files, and if I don't find them, then I download them from a google database.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f380847%2fis-it-possible-to-translate-words-via-terminal%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            7 Answers
            7






            active

            oldest

            votes








            7 Answers
            7






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            30














            For offline use:



            You can install dictd server and use Freedict Dictionary database for word translations.



            Install dictd:



            sudo apt-get install dictd


            dictd



            Install translation database. eg. dict-freedict-eng-fra for English to French translation, dict-freedict-eng-spa for English to Spanish translation.



            sudo apt-get install dict-freedict-eng-fra
            sudo apt-get install dict-freedict-eng-spa


            freedictDB



            Usage:



            View list of databases:



            dict -D


            Use a particular database eg. for English to Spanish translation:



            dict -d fd-eng-spa "how are you?"


            snapHowRU



            For online use:



            Install libtranslate-bin with:



            sudo apt-get install libtranslate-bin


            eg. using online google translate engine:



            echo "what are you doing" | translate-bin -s google -f en -t fr


            onlineGoogleTranslate






            Offline English dictionary in Terminal:



            Installing English dictionary databeses (gcide, wn, devil):



            sudo apt-get install dict-gcide
            sudo apt-get install dict-wn
            sudo apt-get install dict-devil


            Installing English Thesaurus database (moby-thesaurus):



            sudo apt-get install dict-moby-thesaurus


            Usage:





            1. Using a particular database (eg. WordNet - wn):



              dict -d wn "dictionary"



            2. Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.



              dict "dictionary"







            share|improve this answer


























            • Is there a eng-eng dictionary?

              – user224082
              Dec 24 '13 at 20:26






            • 1





              @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

              – precise
              Dec 25 '13 at 3:59






            • 1





              Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

              – user224082
              Dec 25 '13 at 4:02













            • No definitions found for "how are you?"

              – FireInTheSky
              Oct 6 '18 at 2:41











            • does not work . thumb down

              – FireInTheSky
              Oct 6 '18 at 2:52
















            30














            For offline use:



            You can install dictd server and use Freedict Dictionary database for word translations.



            Install dictd:



            sudo apt-get install dictd


            dictd



            Install translation database. eg. dict-freedict-eng-fra for English to French translation, dict-freedict-eng-spa for English to Spanish translation.



            sudo apt-get install dict-freedict-eng-fra
            sudo apt-get install dict-freedict-eng-spa


            freedictDB



            Usage:



            View list of databases:



            dict -D


            Use a particular database eg. for English to Spanish translation:



            dict -d fd-eng-spa "how are you?"


            snapHowRU



            For online use:



            Install libtranslate-bin with:



            sudo apt-get install libtranslate-bin


            eg. using online google translate engine:



            echo "what are you doing" | translate-bin -s google -f en -t fr


            onlineGoogleTranslate






            Offline English dictionary in Terminal:



            Installing English dictionary databeses (gcide, wn, devil):



            sudo apt-get install dict-gcide
            sudo apt-get install dict-wn
            sudo apt-get install dict-devil


            Installing English Thesaurus database (moby-thesaurus):



            sudo apt-get install dict-moby-thesaurus


            Usage:





            1. Using a particular database (eg. WordNet - wn):



              dict -d wn "dictionary"



            2. Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.



              dict "dictionary"







            share|improve this answer


























            • Is there a eng-eng dictionary?

              – user224082
              Dec 24 '13 at 20:26






            • 1





              @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

              – precise
              Dec 25 '13 at 3:59






            • 1





              Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

              – user224082
              Dec 25 '13 at 4:02













            • No definitions found for "how are you?"

              – FireInTheSky
              Oct 6 '18 at 2:41











            • does not work . thumb down

              – FireInTheSky
              Oct 6 '18 at 2:52














            30












            30








            30







            For offline use:



            You can install dictd server and use Freedict Dictionary database for word translations.



            Install dictd:



            sudo apt-get install dictd


            dictd



            Install translation database. eg. dict-freedict-eng-fra for English to French translation, dict-freedict-eng-spa for English to Spanish translation.



            sudo apt-get install dict-freedict-eng-fra
            sudo apt-get install dict-freedict-eng-spa


            freedictDB



            Usage:



            View list of databases:



            dict -D


            Use a particular database eg. for English to Spanish translation:



            dict -d fd-eng-spa "how are you?"


            snapHowRU



            For online use:



            Install libtranslate-bin with:



            sudo apt-get install libtranslate-bin


            eg. using online google translate engine:



            echo "what are you doing" | translate-bin -s google -f en -t fr


            onlineGoogleTranslate






            Offline English dictionary in Terminal:



            Installing English dictionary databeses (gcide, wn, devil):



            sudo apt-get install dict-gcide
            sudo apt-get install dict-wn
            sudo apt-get install dict-devil


            Installing English Thesaurus database (moby-thesaurus):



            sudo apt-get install dict-moby-thesaurus


            Usage:





            1. Using a particular database (eg. WordNet - wn):



              dict -d wn "dictionary"



            2. Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.



              dict "dictionary"







            share|improve this answer















            For offline use:



            You can install dictd server and use Freedict Dictionary database for word translations.



            Install dictd:



            sudo apt-get install dictd


            dictd



            Install translation database. eg. dict-freedict-eng-fra for English to French translation, dict-freedict-eng-spa for English to Spanish translation.



            sudo apt-get install dict-freedict-eng-fra
            sudo apt-get install dict-freedict-eng-spa


            freedictDB



            Usage:



            View list of databases:



            dict -D


            Use a particular database eg. for English to Spanish translation:



            dict -d fd-eng-spa "how are you?"


            snapHowRU



            For online use:



            Install libtranslate-bin with:



            sudo apt-get install libtranslate-bin


            eg. using online google translate engine:



            echo "what are you doing" | translate-bin -s google -f en -t fr


            onlineGoogleTranslate






            Offline English dictionary in Terminal:



            Installing English dictionary databeses (gcide, wn, devil):



            sudo apt-get install dict-gcide
            sudo apt-get install dict-wn
            sudo apt-get install dict-devil


            Installing English Thesaurus database (moby-thesaurus):



            sudo apt-get install dict-moby-thesaurus


            Usage:





            1. Using a particular database (eg. WordNet - wn):



              dict -d wn "dictionary"



            2. Not specifying a dict-database will output definitions/translations/thesaurus from all available databases. eg.



              dict "dictionary"








            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 25 '13 at 4:04

























            answered Dec 24 '13 at 20:20









            preciseprecise

            10.7k65079




            10.7k65079













            • Is there a eng-eng dictionary?

              – user224082
              Dec 24 '13 at 20:26






            • 1





              @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

              – precise
              Dec 25 '13 at 3:59






            • 1





              Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

              – user224082
              Dec 25 '13 at 4:02













            • No definitions found for "how are you?"

              – FireInTheSky
              Oct 6 '18 at 2:41











            • does not work . thumb down

              – FireInTheSky
              Oct 6 '18 at 2:52



















            • Is there a eng-eng dictionary?

              – user224082
              Dec 24 '13 at 20:26






            • 1





              @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

              – precise
              Dec 25 '13 at 3:59






            • 1





              Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

              – user224082
              Dec 25 '13 at 4:02













            • No definitions found for "how are you?"

              – FireInTheSky
              Oct 6 '18 at 2:41











            • does not work . thumb down

              – FireInTheSky
              Oct 6 '18 at 2:52

















            Is there a eng-eng dictionary?

            – user224082
            Dec 24 '13 at 20:26





            Is there a eng-eng dictionary?

            – user224082
            Dec 24 '13 at 20:26




            1




            1





            @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

            – precise
            Dec 25 '13 at 3:59





            @DuminduMahawela: ... there are... I've updated my post including a few of them... hope you'll like them...

            – precise
            Dec 25 '13 at 3:59




            1




            1





            Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

            – user224082
            Dec 25 '13 at 4:02







            Thanks. I was searching some period for a terminal eng-eng dictionatry. You have done good job.

            – user224082
            Dec 25 '13 at 4:02















            No definitions found for "how are you?"

            – FireInTheSky
            Oct 6 '18 at 2:41





            No definitions found for "how are you?"

            – FireInTheSky
            Oct 6 '18 at 2:41













            does not work . thumb down

            – FireInTheSky
            Oct 6 '18 at 2:52





            does not work . thumb down

            – FireInTheSky
            Oct 6 '18 at 2:52













            10














            Translate Shell



            Translate Shell (ex Google Translate CLI) is a tool that lets you use translate text from the command line using Google Translate.



            Installation



            $ wget git.io/trans
            $ chmod +x ./trans


            Or



            sudo apt install translate-shell


            Or



            $ git clone https://github.com/soimort/translate-shell
            $ cd translate-shell/
            $ make
            $ [sudo] make install


            Usage



            To translate



            trans en:de "The quick brown fox jumps over the lazy dog"  # Translate to German (de)
            trans es: "Igualdad, fraternidad y libertad" # From Spanish to your `locale`
            trans :fr "Igualdad, fraternidad y libertad" # From your `locale` to French
            trans -b :fr "Igualdad, fraternidad y libertad" # Same but `-brief`


            As a dictionary: Google Translate can be used as a dictionary when lang from==to or -d parameter is used



            trans -d fr: mot


            Additional information and some examples can be found in the official site






            share|improve this answer


























            • make: *** No rule to make target 'install'. Stop.

              – FireInTheSky
              Oct 6 '18 at 2:44











            • wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

              – FireInTheSky
              Oct 6 '18 at 2:50











            • does not work , thumb down

              – FireInTheSky
              Oct 6 '18 at 2:51
















            10














            Translate Shell



            Translate Shell (ex Google Translate CLI) is a tool that lets you use translate text from the command line using Google Translate.



            Installation



            $ wget git.io/trans
            $ chmod +x ./trans


            Or



            sudo apt install translate-shell


            Or



            $ git clone https://github.com/soimort/translate-shell
            $ cd translate-shell/
            $ make
            $ [sudo] make install


            Usage



            To translate



            trans en:de "The quick brown fox jumps over the lazy dog"  # Translate to German (de)
            trans es: "Igualdad, fraternidad y libertad" # From Spanish to your `locale`
            trans :fr "Igualdad, fraternidad y libertad" # From your `locale` to French
            trans -b :fr "Igualdad, fraternidad y libertad" # Same but `-brief`


            As a dictionary: Google Translate can be used as a dictionary when lang from==to or -d parameter is used



            trans -d fr: mot


            Additional information and some examples can be found in the official site






            share|improve this answer


























            • make: *** No rule to make target 'install'. Stop.

              – FireInTheSky
              Oct 6 '18 at 2:44











            • wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

              – FireInTheSky
              Oct 6 '18 at 2:50











            • does not work , thumb down

              – FireInTheSky
              Oct 6 '18 at 2:51














            10












            10








            10







            Translate Shell



            Translate Shell (ex Google Translate CLI) is a tool that lets you use translate text from the command line using Google Translate.



            Installation



            $ wget git.io/trans
            $ chmod +x ./trans


            Or



            sudo apt install translate-shell


            Or



            $ git clone https://github.com/soimort/translate-shell
            $ cd translate-shell/
            $ make
            $ [sudo] make install


            Usage



            To translate



            trans en:de "The quick brown fox jumps over the lazy dog"  # Translate to German (de)
            trans es: "Igualdad, fraternidad y libertad" # From Spanish to your `locale`
            trans :fr "Igualdad, fraternidad y libertad" # From your `locale` to French
            trans -b :fr "Igualdad, fraternidad y libertad" # Same but `-brief`


            As a dictionary: Google Translate can be used as a dictionary when lang from==to or -d parameter is used



            trans -d fr: mot


            Additional information and some examples can be found in the official site






            share|improve this answer















            Translate Shell



            Translate Shell (ex Google Translate CLI) is a tool that lets you use translate text from the command line using Google Translate.



            Installation



            $ wget git.io/trans
            $ chmod +x ./trans


            Or



            sudo apt install translate-shell


            Or



            $ git clone https://github.com/soimort/translate-shell
            $ cd translate-shell/
            $ make
            $ [sudo] make install


            Usage



            To translate



            trans en:de "The quick brown fox jumps over the lazy dog"  # Translate to German (de)
            trans es: "Igualdad, fraternidad y libertad" # From Spanish to your `locale`
            trans :fr "Igualdad, fraternidad y libertad" # From your `locale` to French
            trans -b :fr "Igualdad, fraternidad y libertad" # Same but `-brief`


            As a dictionary: Google Translate can be used as a dictionary when lang from==to or -d parameter is used



            trans -d fr: mot


            Additional information and some examples can be found in the official site







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 21 at 7:22









            Pablo Bianchi

            2,6151532




            2,6151532










            answered Mar 13 '14 at 15:21









            MaythuxMaythux

            51.1k32171217




            51.1k32171217













            • make: *** No rule to make target 'install'. Stop.

              – FireInTheSky
              Oct 6 '18 at 2:44











            • wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

              – FireInTheSky
              Oct 6 '18 at 2:50











            • does not work , thumb down

              – FireInTheSky
              Oct 6 '18 at 2:51



















            • make: *** No rule to make target 'install'. Stop.

              – FireInTheSky
              Oct 6 '18 at 2:44











            • wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

              – FireInTheSky
              Oct 6 '18 at 2:50











            • does not work , thumb down

              – FireInTheSky
              Oct 6 '18 at 2:51

















            make: *** No rule to make target 'install'. Stop.

            – FireInTheSky
            Oct 6 '18 at 2:44





            make: *** No rule to make target 'install'. Stop.

            – FireInTheSky
            Oct 6 '18 at 2:44













            wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

            – FireInTheSky
            Oct 6 '18 at 2:50





            wget github.com/soimort/google-translate-cli/archive/master.tar.gz && tar -xvf master.tar.gz && cd translate-shell-master && sudo make install && trs "some text" && trs {en=afr} "TEXT TO TRANSLATE"

            – FireInTheSky
            Oct 6 '18 at 2:50













            does not work , thumb down

            – FireInTheSky
            Oct 6 '18 at 2:51





            does not work , thumb down

            – FireInTheSky
            Oct 6 '18 at 2:51











            4














            Depending on the language you want, check out Apertium for offline machine translation through the terminal. It seems to focus mostly on Romance languages (ES, FR, PT, CAT, OCC..), but looks like they are slowly adding various new languages.



            For Spanish you would install:



            sudo apt install apertium apertium-en-es

            echo "Hola Mundo." | apertium -a es-en
            > Hello world.


            It's terminal based but there's also a basic GUI: apertium-tolk



            The version in the repos is older, if you want a newer version follow the install instructions.






            share|improve this answer






























              4














              Depending on the language you want, check out Apertium for offline machine translation through the terminal. It seems to focus mostly on Romance languages (ES, FR, PT, CAT, OCC..), but looks like they are slowly adding various new languages.



              For Spanish you would install:



              sudo apt install apertium apertium-en-es

              echo "Hola Mundo." | apertium -a es-en
              > Hello world.


              It's terminal based but there's also a basic GUI: apertium-tolk



              The version in the repos is older, if you want a newer version follow the install instructions.






              share|improve this answer




























                4












                4








                4







                Depending on the language you want, check out Apertium for offline machine translation through the terminal. It seems to focus mostly on Romance languages (ES, FR, PT, CAT, OCC..), but looks like they are slowly adding various new languages.



                For Spanish you would install:



                sudo apt install apertium apertium-en-es

                echo "Hola Mundo." | apertium -a es-en
                > Hello world.


                It's terminal based but there's also a basic GUI: apertium-tolk



                The version in the repos is older, if you want a newer version follow the install instructions.






                share|improve this answer















                Depending on the language you want, check out Apertium for offline machine translation through the terminal. It seems to focus mostly on Romance languages (ES, FR, PT, CAT, OCC..), but looks like they are slowly adding various new languages.



                For Spanish you would install:



                sudo apt install apertium apertium-en-es

                echo "Hola Mundo." | apertium -a es-en
                > Hello world.


                It's terminal based but there's also a basic GUI: apertium-tolk



                The version in the repos is older, if you want a newer version follow the install instructions.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 20 at 19:06









                Pablo Bianchi

                2,6151532




                2,6151532










                answered Jan 12 '16 at 14:50









                williamtxwilliamtx

                714




                714























                    2














                    I wrote a simple command-line translator base on google translate using Python.



                    The code: The python code is less than 100 lines, and I also wrote an installer script, and provide a config file so that could set your default preferred language.



                    It's under MIT license.



                    Pre-requisites: Python2.x on Linux, is all it needs, it don't support python3 yet, I might fix this later.






                    share|improve this answer






























                      2














                      I wrote a simple command-line translator base on google translate using Python.



                      The code: The python code is less than 100 lines, and I also wrote an installer script, and provide a config file so that could set your default preferred language.



                      It's under MIT license.



                      Pre-requisites: Python2.x on Linux, is all it needs, it don't support python3 yet, I might fix this later.






                      share|improve this answer




























                        2












                        2








                        2







                        I wrote a simple command-line translator base on google translate using Python.



                        The code: The python code is less than 100 lines, and I also wrote an installer script, and provide a config file so that could set your default preferred language.



                        It's under MIT license.



                        Pre-requisites: Python2.x on Linux, is all it needs, it don't support python3 yet, I might fix this later.






                        share|improve this answer















                        I wrote a simple command-line translator base on google translate using Python.



                        The code: The python code is less than 100 lines, and I also wrote an installer script, and provide a config file so that could set your default preferred language.



                        It's under MIT license.



                        Pre-requisites: Python2.x on Linux, is all it needs, it don't support python3 yet, I might fix this later.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Jan 21 at 7:58

























                        answered Jan 10 '15 at 6:03









                        Eric WangEric Wang

                        17710




                        17710























                            1














                            Have a look at sdcv based answer here (It also has "Xlanguage" to "Ylanguage" dictionaries):



                            Is there an offline command-line dictionary?



                            Should also check surfraw. Once you install, you may get meaning of a word through sr webster difficultWord. One way to translate will be through sr google difficultword in hindi.There will probably be other options for translation as well.






                            share|improve this answer






























                              1














                              Have a look at sdcv based answer here (It also has "Xlanguage" to "Ylanguage" dictionaries):



                              Is there an offline command-line dictionary?



                              Should also check surfraw. Once you install, you may get meaning of a word through sr webster difficultWord. One way to translate will be through sr google difficultword in hindi.There will probably be other options for translation as well.






                              share|improve this answer




























                                1












                                1








                                1







                                Have a look at sdcv based answer here (It also has "Xlanguage" to "Ylanguage" dictionaries):



                                Is there an offline command-line dictionary?



                                Should also check surfraw. Once you install, you may get meaning of a word through sr webster difficultWord. One way to translate will be through sr google difficultword in hindi.There will probably be other options for translation as well.






                                share|improve this answer















                                Have a look at sdcv based answer here (It also has "Xlanguage" to "Ylanguage" dictionaries):



                                Is there an offline command-line dictionary?



                                Should also check surfraw. Once you install, you may get meaning of a word through sr webster difficultWord. One way to translate will be through sr google difficultword in hindi.There will probably be other options for translation as well.







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Apr 13 '17 at 12:23









                                Community

                                1




                                1










                                answered Jul 31 '15 at 11:47









                                ChampChamp

                                13912




                                13912























                                    1














                                    Translate "life" to portuguese. Example bellow: (lynx must be installed)



                                    lynx -source 'http://translate.google.com/translate_t?langpair=en|pt&text='life |awk {'print $852'} | cut -d = -f5 |cut -d ';' -f1 |awk 'NF>0'


                                    Where, "en" is english and "pt" is portuguese



                                    Output:
                                    'vida'






                                    share|improve this answer




























                                      1














                                      Translate "life" to portuguese. Example bellow: (lynx must be installed)



                                      lynx -source 'http://translate.google.com/translate_t?langpair=en|pt&text='life |awk {'print $852'} | cut -d = -f5 |cut -d ';' -f1 |awk 'NF>0'


                                      Where, "en" is english and "pt" is portuguese



                                      Output:
                                      'vida'






                                      share|improve this answer


























                                        1












                                        1








                                        1







                                        Translate "life" to portuguese. Example bellow: (lynx must be installed)



                                        lynx -source 'http://translate.google.com/translate_t?langpair=en|pt&text='life |awk {'print $852'} | cut -d = -f5 |cut -d ';' -f1 |awk 'NF>0'


                                        Where, "en" is english and "pt" is portuguese



                                        Output:
                                        'vida'






                                        share|improve this answer













                                        Translate "life" to portuguese. Example bellow: (lynx must be installed)



                                        lynx -source 'http://translate.google.com/translate_t?langpair=en|pt&text='life |awk {'print $852'} | cut -d = -f5 |cut -d ';' -f1 |awk 'NF>0'


                                        Where, "en" is english and "pt" is portuguese



                                        Output:
                                        'vida'







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Sep 16 '15 at 22:05









                                        Cleber ReizenCleber Reizen

                                        112




                                        112























                                            0














                                            I have written a simple command-line translator based on text files. It also reproduces an audio file if it exists. I already have a database of audio files, and if I don't find them, then I download them from a google database.






                                            share|improve this answer






























                                              0














                                              I have written a simple command-line translator based on text files. It also reproduces an audio file if it exists. I already have a database of audio files, and if I don't find them, then I download them from a google database.






                                              share|improve this answer




























                                                0












                                                0








                                                0







                                                I have written a simple command-line translator based on text files. It also reproduces an audio file if it exists. I already have a database of audio files, and if I don't find them, then I download them from a google database.






                                                share|improve this answer















                                                I have written a simple command-line translator based on text files. It also reproduces an audio file if it exists. I already have a database of audio files, and if I don't find them, then I download them from a google database.







                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Jan 21 at 7:27









                                                Pablo Bianchi

                                                2,6151532




                                                2,6151532










                                                answered Mar 30 '17 at 6:19









                                                SantiagoSantiago

                                                1




                                                1






























                                                    draft saved

                                                    draft discarded




















































                                                    Thanks for contributing an answer to Ask Ubuntu!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid



                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.


                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function () {
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f380847%2fis-it-possible-to-translate-words-via-terminal%23new-answer', 'question_page');
                                                    }
                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown







                                                    Popular posts from this blog

                                                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                                    Mangá

                                                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕