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

Allow to change the UI language / Application default language #478

Open
kelson42 opened this issue Jul 5, 2020 · 10 comments · May be fixed by #1069
Open

Allow to change the UI language / Application default language #478

kelson42 opened this issue Jul 5, 2020 · 10 comments · May be fixed by #1069
Assignees
Labels
enhancement UI User Interface
Milestone

Comments

@kelson42
Copy link
Collaborator

kelson42 commented Jul 5, 2020

This might be useful for a few users (and for developers to make tests).

@kelson42 kelson42 added the UI User Interface label Jul 5, 2020
@kelson42 kelson42 pinned this issue Jul 11, 2020
@kelson42 kelson42 unpinned this issue Jul 21, 2020
@stale
Copy link

stale bot commented Sep 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@stale stale bot added the stale label Sep 4, 2020
@stale stale bot removed the stale label Jan 28, 2021
@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@sgourdas
Copy link
Collaborator

I made a PR to allow language change support from the settings menu.

Some problems I would like to discuss are:

  • For now user needs to restart the application for changes to take effect. Should we put a note below the option to indicate that? Or maybe is there a suggestion to dynamically refresh text elements, after language selection.
  • For the moment, because there wasn't any discussion that I found regarding how to get the languages, I am statically importing the language codes based on the ls resources/i18n | awk -F '.json' '{print $1}' output. What would be a better way to get the languages available?
  • Using the above codes, I convert them to language names using QLocale(country_code). This makes it so some of the languages appear as "C" (for example QLocale("bcl"))? Should we not use these languages? How can we tackle this?

@sgourdas
Copy link
Collaborator

sgourdas commented Mar 26, 2024

Sample:

image

@stale stale bot removed the stale label Mar 26, 2024
@kelson42 kelson42 added this to the 2.4.0 milestone Apr 8, 2024
@kelson42
Copy link
Collaborator Author

kelson42 commented Apr 8, 2024

  • For now user needs to restart the application for changes to take effect. Should we put a note below the option to indicate that? Or maybe is there a suggestion to dynamically refresh text elements, after language selection.

Ideal solution would to apply dynamically and directly the new UI langauge without restart. But not sure how this should be done. Otherwise I would recommend following workflow:

  • change the language
  • Inform the user that we need a restart and ask him if he wants to do it
  • If yes, go ahead otherwise, reset the choice to the previous one
* For the moment, because there wasn't any discussion that I found regarding how to get the languages, I am statically importing the language codes based on the `ls resources/i18n | awk -F '.json' '{print $1}'` output. What would be a better way to get the languages available?

Qt has for sure a way to list the language available as translation for the app... the main question is if you can display each language name is there language so "Francais" for "French" etc.

* Using the above codes, I convert them to language names using `QLocale(country_code)`. This makes it so some of the languages appear as ["C"](https://doc.qt.io/qt-5/qlocale.html#c) (for example `QLocale("bcl")`)? Should we not use these languages? How can we tackle this?

Here you are :) You will have to handle a local list of language name because qt does not have them all....

@sgourdas
Copy link
Collaborator

Here you are :) You will have to handle a local list of language name because qt does not have them all....

Can you please elaborate on this

@kelson42
Copy link
Collaborator Author

Here you are :) You will have to handle a local list of language name because qt does not have them all....

Can you please elaborate on this

I don't know how to do that, but the list of known language by Qt is limited, so what is the solution you plan? IMHO, you will need something custom. We have this partly already implemented in the libkiwix AFAIK.

@kelson42 kelson42 modified the milestones: 2.4.0, 2.5.0 Apr 30, 2024
@kelson42
Copy link
Collaborator Author

@sgourdas Impropose to close this PR. The work needed here is significant and I believe we might better work on other issues for the moment. But, of course, if you are really motivated, we can bring it to the end.

@sgourdas
Copy link
Collaborator

I will try to give it a good push this upcoming week. Let's see how it goes and we can move accordingly.

@kelson42
Copy link
Collaborator Author

@sgourdas I recommend to have a look how Kiwix Server works, from both developer and user perspective.

@kelson42 kelson42 modified the milestones: 2.5.0, 2.6.0 Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement UI User Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants