Adding localization (foreign language) support to PyQtGrah

40 views
Skip to first unread message

ivan....@gmail.com

unread,
Feb 24, 2017, 5:17:01 AM2/24/17
to pyqtgraph
It would be nice if PyQtGraph had support for localizations (foreign language support).

In my application that uses PyQtGraph, we have a requirement that a future version of our application support foreign languages. In preparation for this, since I started coding it, I have been wrapping all English strings that appear in my application and are presented to the user in the "self.tr()" method. Translation is then easily accomplished by the tools provided by Qt.

I think it would be sufficient to simply wrap all the English strings that appear in the popup menu in self.tr(). Then the menu can be translated. I don't think it is necessary to do this for the examples (and I'm not going to be translating the examples) and I don't think it is necessary to add more sophisticated localization features, such as number formatting options (in some languages, the comma is used instead of the period for the decimal point). The popup menu is the only thing I think needs to be addressed to support foreign languages. It would be undesirable to also wrap the English strings that appear in exceptions that are raised. Doing so would include these strings in the list of strings presented to the person doing the translations and since these are not normally seen, translating them is unnecessary.

Luke, would you please consider adding this to a future release of PyQtGraph?


Sérgio Peixoto

unread,
Jan 25, 2021, 11:05:43 AM1/25/21
to pyqtgraph
Is there any progress on this request? I'm also interested in this feature for the popup menus.

Cheers,
Sérgio

Ognyan Moore

unread,
Jan 25, 2021, 11:53:47 AM1/25/21
to pyqt...@googlegroups.com
I want to implement this feature right away, but I would need someone to assist with development/testing as I've never used Qt's localization tools before.  There is an open issue (#649) right now requesting this feature for context menus; we can either start with there or create a longer feature.

If someone that has a local system with a different language wants to assist me with testing, please let me know.

--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/bcb62226-4e2b-4021-90ea-345887dd4900n%40googlegroups.com.

Sérgio Peixoto

unread,
Jan 25, 2021, 12:09:46 PM1/25/21
to pyqt...@googlegroups.com
I can help you out since I've a local system with Portuguese locales.

Cheers,
Sérgio

Reply all
Reply to author
Forward
0 new messages