dictionary/translate API #944

Open
opened 2026-05-13 08:22:47 +00:00 by c24danli · 2 comments
Collaborator

dictionary/translate
many API's exist one example is freedictionaryapi that support many languages.
This is not meant to be used for translating things in practice more as a fun API to see what certain words are in different languages
Research / decitions

  • Do we want this?
  • Which API do we want to use and is it legal to use
  • There exist many languages to witch do we want to translate?
dictionary/translate many API's exist one example is[ freedictionaryapi ](https://freedictionaryapi.com/) that support many languages. This is not meant to be used for translating things in practice more as a fun API to see what certain words are in different languages Research / decitions - Do we want this? - Which API do we want to use and is it legal to use - There exist many languages to witch do we want to translate?
Collaborator

FreeDictionaryApi

FreeDictionaryApi is a free API that provides dictionary data from Wiktionary. It can be used to get word translations, definitions and examples.

Features

  • Synonyms and antonyms
  • Word definitions
  • Pronunciations
  • Example sentences
  • Translation support
  • Multiple languages

Usage

  • REST API
  • JSON response
  • Simple request structure

Request example

GET https://freedictionaryapi.com/api/v1/entries/fr/maison?translations=true

  • fr is the language
  • maison is the search word
  • translations=true includes translations in the response

Pros

  • Free to use
  • Simple request structure
  • No API key is required
  • Supports many languages

Cons

  • Limited to 1000 requests per hour per IP address
  • More focused on dictionary lookups than full sentence translations

Licence

The API uses Wiktionary data under the CC BY-SA 4.0 license. Attribution to Wiktionary and FreeDictionaryApi is required when using the API.

Conclusion

FreeDictionaryApi could work well for simple dictionary or word translation features. It's free, easy to use and does not require authentication.

LibreTranslate

LibreTranslate is an open source machine translation API. Can be used to transtale:

  • Words
  • Text files
  • Full sentences
  • Supports automatic language detection
  • Supports multiple languages

Features

  • Word translation
  • File translation
  • Full sentence translation
  • Self hosted support
  • Multiple languages

Usage

  • REST API
  • JSON responses
  • POST requests

Request example (self-hosted)

POST http://localhost:5000/translate
Example body

{
    q: "Hello world", 
    source: "en", 
    target: "es"
}

Example response

{
    "translatedText": "Hola mundo"
}

Pros

  • Free to use when self hosted
  • Open source
  • Can translate full sentences
  • Supports many languages

Cons

  • Self hosting requires additional setup and configuration

Licence

Uses the AGPLv3 open source license

Conclusion

LibreTranslate could be a good option for full sentence and multi language translation support. It allows self hosting and gives more translation functionality than dictionary APIs.

Do we want this?

Translation functionality could be a fun addition to the project for translating simple words between multiple languages. Based on the research, FreeDictionaryApi seems to be the most suitable option if the goal is mainly simple word translations or dictionary style lookups. It's free, simple to use and does not require authentication. LibreTranslate supports more translation options like full sentence translations and can also be self hosted. However, it may be unnecessary if the feature is only intended for translating individual words. Both APIs support multiple languages and legal to use as long as their license requirements are followed.

## FreeDictionaryApi FreeDictionaryApi is a free API that provides dictionary data from Wiktionary. It can be used to get word translations, definitions and examples. ### Features + Synonyms and antonyms + Word definitions + Pronunciations + Example sentences + Translation support + Multiple languages ### Usage + REST API + JSON response + Simple request structure ### Request example GET `https://freedictionaryapi.com/api/v1/entries/fr/maison?translations=true` - `fr` is the language - `maison` is the search word - `translations=true` includes translations in the response ### Pros + Free to use + Simple request structure + No API key is required + Supports many languages ### Cons + Limited to 1000 requests per hour per IP address + More focused on dictionary lookups than full sentence translations ### Licence The API uses Wiktionary data under the CC BY-SA 4.0 license. Attribution to Wiktionary and FreeDictionaryApi is required when using the API. ### Conclusion FreeDictionaryApi could work well for simple dictionary or word translation features. It's free, easy to use and does not require authentication. ## LibreTranslate [LibreTranslate](https://docs.libretranslate.com) is an open source machine translation API. Can be used to transtale: + Words + Text files + Full sentences + Supports automatic language detection + Supports multiple languages ### Features + Word translation + File translation + Full sentence translation + Self hosted support + Multiple languages ### Usage + REST API + JSON responses + POST requests ### Request example (self-hosted) POST `http://localhost:5000/translate` Example body ``` { q: "Hello world", source: "en", target: "es" } ``` Example response ``` { "translatedText": "Hola mundo" } ``` ### Pros + Free to use when self hosted + Open source + Can translate full sentences + Supports many languages ### Cons + Self hosting requires additional setup and configuration ### Licence Uses the [AGPLv3](https://www.gnu.org/licenses/agpl-3.0.en.html) open source license ### Conclusion LibreTranslate could be a good option for full sentence and multi language translation support. It allows self hosting and gives more translation functionality than dictionary APIs. ## Do we want this? Translation functionality could be a fun addition to the project for translating simple words between multiple languages. Based on the research, FreeDictionaryApi seems to be the most suitable option if the goal is mainly simple word translations or dictionary style lookups. It's free, simple to use and does not require authentication. LibreTranslate supports more translation options like full sentence translations and can also be self hosted. However, it may be unnecessary if the feature is only intended for translating individual words. Both APIs support multiple languages and legal to use as long as their license requirements are followed.
Author
Collaborator

Looks good, we will create an issue for implementation of a view using FreeDictionaryApi.
And the conclusion will be added to the wiki.

Looks good, we will create an issue for implementation of a view using FreeDictionaryApi. And the conclusion will be added to the wiki.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#944
No description provided.