akvedi / lexicon

An efficiant Dictionary add-on. Double-click any word and instantly view its definition in a pop-up bubble
GNU General Public License v3.0
8 stars 0 forks source link

[Feature request] Allow multiple languages to be used at the same time #6

Open fabiorzfreitas opened 1 year ago

fabiorzfreitas commented 1 year ago

I'm Brazilian, but the internet is written in English. This means that I constantly keep switching from a tab or video in English to one in Portuguese, then back to English and so on.

A keyboard shortcut for switching languages could do the trick, but it would be better if the add-on automatically searched in all of the selected languages and present results for those languages, even if the word is not found in one of the dictionaries.

As an example, suppose I highlighted the word "pasta". The pop-up balloon would maybe show this:

akvedi commented 1 year ago

Adding multiple languages at the same time will make it slow. However one better way I think to add this is by making language as tab. That way it will just a click away to switch the language.

fabiorzfreitas commented 1 year ago

I don't really understand what you mean by "making language as tab".

Still, if the idea is to be "a click away to switch the language", I think it's really important to add it as a keyboard shortcut as well (when using shortcuts, Mozilla demands addons to have a default shortcut, but the users can always reassign to their preference).

I believe that the "switch language" function should be implemented as a command to circle through the languages, and here comes my main point:

I understand and agree that adding many languages at the same time would make it slower. But taking my initial suggestion as an example, I only added Chinese to further explain my idea, even if, for myself, I would only need Portuguese and English.

Given that, I believe that the ideal approach/enhancement would be to allow users to mark a checkbox for each language they want active. And I think this fits both proposals here: it would only be as slow as how many languages the user set active (and let's face it: a dictionary is used by someone who already knows the language, but don't know a specific word. i.e. Chinese would be useless for me, since looking up the definition of a single word would not nearly be enough to understand a sentence, so I think it's safe to assume that very few users would activate 3 languages or more).

If the user intends to activate multiple languages, they're willing to dive into the options page, so that would be the perfect spot to place a disclosure/warning about how adding more languages would impact the performance.