desmos-labs / mooncake

The first decentralized social app based on Desmos
MIT License
46 stars 14 forks source link

Implementing content language selection #9

Open RiccardoM opened 4 years ago

RiccardoM commented 4 years ago

Currently when a user opens Mooncake, he is prompted with the latest 50 messages that are present inside the chain. Such messages can be written in many different languages.

In order to make users more comfortable inside the application itself, we should provide them with the ability of selecting the language(s) they would want the content to be displayed on. A possible implementation of a system could be the following:

  1. When parsing a post using Djuno, we could determine the language of the post message itself by using a natural language detection library such as Whatlanggo.
  2. Once we have determined the language, we can store that data inside our local database.
  3. Upon starting the application (if he has not done so yet), the user will be asked to select the one or more language(s) he would like the contents to be showed in.
  4. When querying the GraphQL APIs, we can simply filter the posts that have contents in the languages selected by the user.