Have ideas to improve npm?Join in the discussion! »

    tureng-translator
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    Tureng Translator

    This package allows you to get multiple meanings of a word asynchronously between;

    • Turkish to English
    • English to Turkish
    • French to English
    • Spanish to English
    • German to English

    Example

     const config: Config = {
       amount: 1   
       //you can specify how many word meanings you want
       detailed: false; 
       //allows you get all meanings of a word or just the first table on tureng.com
       //detailed property is set false default
     }
     //  config 
     const tc = new TurengCrawler();
     const data = await tc.translate("aircraft", TranslationType.ENGTUR, config);
     /*[{
         description: 'Meanings of "aircraft" in Turkish English Dictionary : 42 result(s)',
         words: [ [Word] ]
       }]
      
        also word has these properties;
      
        {
            category: 'Common Usage',
            type: 'n. ',
            translatedFrom: 'en',
            text: 'aircraft',
            order: 1,
            translatedTo: 'tr',
            translatedText: 'uçak'
        } 
      */

    Install

    npm i tureng-translator

    DownloadsWeekly Downloads

    10

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    22 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar