Inquiry About Translating ChimeraX GUI Language

Dear UCSF ChimeraX Developers, I hope this email finds you well. Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs. I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications. Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated. Thank you very much for your time and consideration. Best regards! Junhua Liu 273667986@qq.com

So, of course it is possible. And it is a good idea, but it would a lot of work. See https://wiki.qt.io/How_to_create_a_multi_language_application for hints in C++. The Python version should be fairly similar. Switching the language dynamically would not need to be supported. Basically, any where there is GUI text, a translation function call needs to be made. There are lots of places where that is done. And support would need to be added to generate the translation files. It would be easier if ChimeraX used Qt's .ui files, but that ship has sailed. If you were to order which dialogs would have translations, which ones would you pick first? HTH, Greg On 10/22/2024 9:36 AM, 刘俊骅 via ChimeraX-users wrote:
Dear UCSF ChimeraX Developers,
I hope this email finds you well.
Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs.
I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications.
Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated.
Thank you very much for your time and consideration.
Best regards!
Junhua Liu 273667986@qq.com
_______________________________________________ ChimeraX-users mailing list --chimerax-users@cgl.ucsf.edu To unsubscribe send an email tochimerax-users-leave@cgl.ucsf.edu Archives:https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Junhua, That would be great to add some Chinese language support in ChimeraX. We haven't looked into supporting languages other than English, but there are many Chinese speaking ChimeraX users. ChimeraX uses the Qt window toolkit which has "internationalization" support. Specifically ChimeraX uses the Python interface to Qt, called PyQt. If you figured out how to customize the ChimeraX GUI text we'd be interested in including that in ChimeraX. Your ChiimeraX distribution includes all the Python code which creates the user interface, so you could experiment with just changing the Python code in your distribution. The ChimeraX code is also on Github here https://github.com/RBVI/ChimeraX Here is the place in the code where the top level File, Edit, Select, Actions, Tools, ... menus are created. https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... I guess the individual menu entries are added in many places in the code. For instance the File / Open... entry is here https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... and it uses the add_menu_entry() function which probably is used to add all the menu entries https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... Let us know what you figure out. Tom
On Oct 22, 2024, at 9:36 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear UCSF ChimeraX Developers,
I hope this email finds you well.
Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs.
I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications.
Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated.
Thank you very much for your time and consideration.
Best regards!
Junhua Liu 273667986@qq.com
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

A very cursory googling for ‘PyQt multilanguage’ brings up this repo: https://github.com/yjg30737/pyqt-multi-language-example but it is for PyQt5. Feel free to fork the ChimeraX repository and make pull requests. We would be eager to learn how to do this and turn it into a community-driven project. — Zach
On 22 Oct 2024, at 11:14, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Junhua,
That would be great to add some Chinese language support in ChimeraX. We haven't looked into supporting languages other than English, but there are many Chinese speaking ChimeraX users. ChimeraX uses the Qt window toolkit which has "internationalization" support. Specifically ChimeraX uses the Python interface to Qt, called PyQt. If you figured out how to customize the ChimeraX GUI text we'd be interested in including that in ChimeraX. Your ChiimeraX distribution includes all the Python code which creates the user interface, so you could experiment with just changing the Python code in your distribution. The ChimeraX code is also on Github here
https://github.com/RBVI/ChimeraX
Here is the place in the code where the top level File, Edit, Select, Actions, Tools, ... menus are created.
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
I guess the individual menu entries are added in many places in the code. For instance the File / Open... entry is here
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
and it uses the add_menu_entry() function which probably is used to add all the menu entries
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
Let us know what you figure out.
Tom
On Oct 22, 2024, at 9:36 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear UCSF ChimeraX Developers, I hope this email finds you well. Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs. I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications. Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated. Thank you very much for your time and consideration. Best regards! Junhua Liu 273667986@qq.com _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

When we initially were designing ChimeraX we thought about using Qt's language support, but that would have added significant overhead to the implementation effort, and since we had a small programming team and many years of development effort ahead of us to just get a useful working program together, we decided to skip including the language support and just use English text. Translating the interface into another language is probably doable for some subset of the menus and tools, but would be quite a daunting task to do completely, since in many cases the text is programmatically generated based on what the underlying data contains. For instance, there are functions in chimerax.core.commands for generating the plural forms of words on an as-needed basis. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Oct 22, 2024, at 11:14 AM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Junhua,
That would be great to add some Chinese language support in ChimeraX. We haven't looked into supporting languages other than English, but there are many Chinese speaking ChimeraX users. ChimeraX uses the Qt window toolkit which has "internationalization" support. Specifically ChimeraX uses the Python interface to Qt, called PyQt. If you figured out how to customize the ChimeraX GUI text we'd be interested in including that in ChimeraX. Your ChiimeraX distribution includes all the Python code which creates the user interface, so you could experiment with just changing the Python code in your distribution. The ChimeraX code is also on Github here
https://github.com/RBVI/ChimeraX
Here is the place in the code where the top level File, Edit, Select, Actions, Tools, ... menus are created.
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
I guess the individual menu entries are added in many places in the code. For instance the File / Open... entry is here
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
and it uses the add_menu_entry() function which probably is used to add all the menu entries
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
Let us know what you figure out.
Tom
On Oct 22, 2024, at 9:36 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear UCSF ChimeraX Developers,
I hope this email finds you well.
Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs.
I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications.
Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated.
Thank you very much for your time and consideration.
Best regards!
Junhua Liu 273667986@qq.com
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Dear Eric, Thank you very much for your detailed explanation and the tremendous effort you have put into developing ChimeraX. Driven by my interest, I will now take the time to further study the code and explore how I can customize the GUI interface to better suit my needs. Once again, thank you for your support and for creating such an outstanding tool. Your work is truly making a significant impact on the scientific community. Best regards, Junhua Liu ------------------ 原始邮件 ------------------ 发件人: "ChimeraX Users Help" <pett@cgl.ucsf.edu>; 发送时间: 2024年10月23日(星期三) 凌晨2:37 收件人: "chimerax-users"<chimerax-users@cgl.ucsf.edu>; 抄送: "刘俊骅"<273667986@qq.com>; 主题: Re: [chimerax-users] Inquiry About Translating ChimeraX GUI Language When we initially were designing ChimeraX we thought about using Qt's language support, but that would have added significant overhead to the implementation effort, and since we had a small programming team and many years of development effort ahead of us to just get a useful working program together, we decided to skip including the language support and just use English text. Translating the interface into another language is probably doable for some subset of the menus and tools, but would be quite a daunting task to do completely, since in many cases the text is programmatically generated based on what the underlying data contains. For instance, there are functions in chimerax.core.commands for generating the plural forms of words on an as-needed basis. --Eric Eric Pettersen UCSF Computer Graphics Lab On Oct 22, 2024, at 11:14 AM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote: Hi Junhua, That would be great to add some Chinese language support in ChimeraX. We haven't looked into supporting languages other than English, but there are many Chinese speaking ChimeraX users. ChimeraX uses the Qt window toolkit which has "internationalization" support. Specifically ChimeraX uses the Python interface to Qt, called PyQt. If you figured out how to customize the ChimeraX GUI text we'd be interested in including that in ChimeraX. Your ChiimeraX distribution includes all the Python code which creates the user interface, so you could experiment with just changing the Python code in your distribution. The ChimeraX code is also on Github here https://github.com/RBVI/ChimeraX Here is the place in the code where the top level File, Edit, Select, Actions, Tools, ... menus are created. https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... I guess the individual menu entries are added in many places in the code. For instance the File / Open... entry is here https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... and it uses the add_menu_entry() function which probably is used to add all the menu entries https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4... Let us know what you figure out. Tom On Oct 22, 2024, at 9:36 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote: Dear UCSF ChimeraX Developers, I hope this email finds you well. Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs. I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications. Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated. Thank you very much for your time and consideration. Best regards! Junhua Liu 273667986@qq.com _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/ _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Junhui, Thank you very much for your kind words. Despite my disclaimers, probably translating 90% or more of the text into Chinese should be straightforward. Even if you can’t translate it all into Chinese, a largely translated version would still be a boon to Chinese users with only limited English skills. —Eric
On Oct 24, 2024, at 12:20 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Eric, Thank you very much for your detailed explanation and the tremendous effort you have put into developing ChimeraX. Driven by my interest, I will now take the time to further study the code and explore how I can customize the GUI interface to better suit my needs. Once again, thank you for your support and for creating such an outstanding tool. Your work is truly making a significant impact on the scientific community. Best regards, Junhua Liu
------------------ 原始邮件 ------------------ 发件人: "ChimeraX Users Help" <pett@cgl.ucsf.edu>; 发送时间: 2024年10月23日(星期三) 凌晨2:37 收件人: "chimerax-users"<chimerax-users@cgl.ucsf.edu>; 抄送: "刘俊骅"<273667986@qq.com>; 主题: Re: [chimerax-users] Inquiry About Translating ChimeraX GUI Language
When we initially were designing ChimeraX we thought about using Qt's language support, but that would have added significant overhead to the implementation effort, and since we had a small programming team and many years of development effort ahead of us to just get a useful working program together, we decided to skip including the language support and just use English text.
Translating the interface into another language is probably doable for some subset of the menus and tools, but would be quite a daunting task to do completely, since in many cases the text is programmatically generated based on what the underlying data contains. For instance, there are functions in chimerax.core.commands for generating the plural forms of words on an as-needed basis.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Oct 22, 2024, at 11:14 AM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Junhua,
That would be great to add some Chinese language support in ChimeraX. We haven't looked into supporting languages other than English, but there are many Chinese speaking ChimeraX users. ChimeraX uses the Qt window toolkit which has "internationalization" support. Specifically ChimeraX uses the Python interface to Qt, called PyQt. If you figured out how to customize the ChimeraX GUI text we'd be interested in including that in ChimeraX. Your ChiimeraX distribution includes all the Python code which creates the user interface, so you could experiment with just changing the Python code in your distribution. The ChimeraX code is also on Github here
https://github.com/RBVI/ChimeraX
Here is the place in the code where the top level File, Edit, Select, Actions, Tools, ... menus are created.
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
I guess the individual menu entries are added in many places in the code. For instance the File / Open... entry is here
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
and it uses the add_menu_entry() function which probably is used to add all the menu entries
https://github.com/RBVI/ChimeraX/blob/1f1a0512d53424163992b53eadeffd2d9e39d4...
Let us know what you figure out.
Tom
On Oct 22, 2024, at 9:36 AM, 刘俊骅 via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear UCSF ChimeraX Developers,
I hope this email finds you well.
Firstly, I would like to express my sincere gratitude for developing such a powerful and versatile software as UCSF ChimeraX. It has been an invaluable tool for my research and visualization needs.
I have a question regarding the translation of the GUI interface language. I am interested in translating the interface into another language. Since I noticed that UCSF ChimeraX is based on Python, I was wondering if it is possible to modify certain .json, .py, or .xml files to change the displayed language. My intention is purely for personal use, and I have no plans to distribute or profit from any modifications.
Could you please provide any guidance or resources on how to achieve this? Any pointers or documentation would be greatly appreciated.
Thank you very much for your time and consideration.
Best regards!
Junhua Liu 273667986@qq.com
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (5)
-
Eric Pettersen
-
Greg Couch
-
Tom Goddard
-
Zach Pearson
-
刘俊骅