Opened 15 years ago
Closed 11 years ago
#879 closed enhancement (fixed)
Add a "change language" option in GRASS GUI
Reported by: | antoniorocha | Owned by: | lucadelu |
---|---|---|---|
Priority: | major | Milestone: | 7.0.0 |
Component: | Translations | Version: | svn-releasebranch64 |
Keywords: | wxGUI, i18n | Cc: | grass-dev@…, martinl |
CPU: | All | Platform: | All |
Description
Instead of changing GRASS language in init.bat files (or other), the user would change its language without quitting GRASS session.
Hamish comment was: I would suggest to put it in Config->GRASS working environment->
I suppose it would have to be a g.gisenv GRASS variable not an environment variable to work system-wide. But then we've have to add some G_getenv() -> setenv() magic in G_parser() and the start of wxgui.py?
Attachments (1)
Change History (16)
follow-ups: 2 3 comment:1 by , 15 years ago
comment:2 by , 15 years ago
Replying to glynn:
Is there some reason why GRASS shouldn't just use the same locale settings as every other application?
Ability to switch application language instead of changing whole work environment language is a nice feature. I use it quite often for QGIS and KDE applications (bug reports, testing l18n regressions etc.). Not everyone is capable of changing system-wide locale settings (read - restricted user rights on shared computers) also "export LANG" is not an lamer friendly way how to do this.
comment:3 by , 15 years ago
Replying to glynn:
Is there some reason why GRASS shouldn't just use the same locale settings as every other application?
Yes: If I am visiting for example Japan/China/Brasil/... I am not necessarily able to understand the local language, i.e. use the localized menus of the PC provided to me.
Currently, this doesn't work on Windows, as localisation relies upon the LANG/LC_* environment variables being set, and Windows doesn't set those, so init.bat needs the fix proposed here or something similar.
This should probably be closed as "invalid" once someone opens a bug report for LANG not being set on Windows.
If it is better to have a separate bug report for this, let's do it. But it won't change the need for a solution.
Markus
comment:4 by , 14 years ago
See also http://trac.osgeo.org/qgis/ticket/3634 "GRASS language is taken from system, not from QGIS settings"
comment:5 by , 13 years ago
Component: | wxGUI → Translations |
---|---|
CPU: | Unspecified → All |
Keywords: | wxGUI i18n added |
Milestone: | 6.4.0 → 6.4.3 |
Platform: | Unspecified → All |
Priority: | normal → major |
Version: | unspecified → svn-releasebranch64 |
comment:6 by , 13 years ago
Owner: | changed from | to
---|
I implemented it for grass7, please check the diff attached.
Best Luca
comment:7 by , 13 years ago
Cc: | added |
---|
follow-up: 10 comment:9 by , 13 years ago
Committed as r49670 with "LANGUAGE" variable added.
TODO: replace locales in combobox, reduce list to only installed locales
comment:10 by , 12 years ago
comment:12 by , 12 years ago
Cc: | added |
---|
follow-up: 14 comment:13 by , 12 years ago
Milestone: | 6.4.3 → 6.4.4 |
---|
Update: changing language settings from wxGUI should work in 6.4.3. It still requires GRASS restart even in GRASS 7. Moving milestone to 6.4.4.
comment:14 by , 12 years ago
Replying to martinl:
Update: changing language settings from wxGUI should work in 6.4.3. It still requires GRASS restart even in GRASS 7. Moving milestone to 6.4.4.
It could be possible to try to reset active WXGUI instance language instantly, still it's not possible to change parent process environment and thus anything not inheriting environment from WXGUI AFTER language change will still be in previous language. Save, restart cycle ensures that GRASS gets the new language and probably locale too, from the start and thus whole GRASS session has correct LANG and other parameters (CLI, all WXGUI instances etc.). Hope that clears a bit.
comment:15 by , 11 years ago
Milestone: | 6.4.4 → 7.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Language switching is working in 7. As GRASS 6 should be feature frozen, moving milestone and closing as implemented. Issues with its implementation in GRASS 7 should be tracked in separate tickets.
Replying to antoniorocha:
Is there some reason why GRASS shouldn't just use the same locale settings as every other application?
Currently, this doesn't work on Windows, as localisation relies upon the LANG/LC_* environment variables being set, and Windows doesn't set those, so init.bat needs the fix proposed here or something similar.
This should probably be closed as "invalid" once someone opens a bug report for LANG not being set on Windows.