Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to change language of plugin #9

Open
lorenzschmid opened this issue Oct 27, 2019 · 4 comments
Open

Add option to change language of plugin #9

lorenzschmid opened this issue Oct 27, 2019 · 4 comments

Comments

@lorenzschmid
Copy link

Using my browser in English, the default of the plugin is French. It would be great if there is a language option to change the plugin's language to German (or French).

@scito
Copy link

scito commented Oct 28, 2019

I can confirm this. My browser is also in English and I see the addon in French.

Maybe instead of a switch. The addon could use the content language, i.e. for a French text, the addon is in French and for a German text, the addon displays in German.

@palrogg
Copy link
Contributor

palrogg commented Nov 19, 2019

Hello,
thank you for the feedback and sorry for the late reply!

@lorenzschmid : I think the cleanest approach would be to set your 2nd preferred language in Firefox / Chrome, works fine for me. But I’d like to add a switch which stores a language preference in the future

@scito : good idea, but actually document.documentElement.lang is sometimes empty, for example on blick.ch, so I’d rather go for the switch

@lorenzschmid
Copy link
Author

Thanks for your reply and true, I haven't thought of setting a second language in my browser.

Concerning the implementation, why not do both, i.e. use document.documentElement.lang and if it is not present use a fallback language given by a switch (or the other way around with a switch option "automatic)?

@palrogg
Copy link
Contributor

palrogg commented Dec 23, 2019

Update:

  • the i18n API doesn't support a language change FF Chrome, so it would mean rewriting part of it. Maybe in 2020
  • language switch done (choice saved to local storage) but obviously not in use yet

Capture d’écran 2019-12-23 à 14 15 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants