Default language issue, v 1.99, macOS

v 1.99 seems to pick whatever alternative keyboard layout is used in macOS and switches to that language, even though US English layout is the default, and there is no way to change that except removing these keyboard layouts.

For example, I use Greek layout to be able to easily enter Greek letters in formulas and such, and when I start Avogadro it automatically switches to Greek localization; I don’t speak Greek, so it’s clearly a problem.

Cheers,
-Qadir

You’re right that Avogadro’s default is the system language, which is set by the OS.

If you go to Extensions ⇒ User Interface Language you can set a different default (e.g., American English) which should then be used any time you restart.

Not quite: although the system language is English, Avogadro picks up a language of alternative keyboard layout by default (screenshot attached). Perhaps the code determining the system language needs some tweaking…

“Extensions ⇒ User Interface Language” did work, thanks.

Also—thanks so much for Avogadro! Been using it extensively for work and teaching for many years :pray:

Mac currently has more flexible options for tweaking the system language / locale than other OS.

I don’t think this is correct. Everything is my system is US English, I just maintain a second keyboard that’s Greek to enter Greek letter more easily, and Avogadro defaulted to Greek for its UI. I had to change that via the extensions menu, which was labelled in Greek (although the individual UI language item was in English, fortunately).

It would help considerably to know what OS you’re using - is this a Mac as well?

We use Qt for cross-platform support, which indicates:

QLocale supports the concept of a default locale, which is determined from the system’s locale settings at application startup.

That’s literally what we do by default - create a default locale. Now if we need to get the default language differently on Mac, we can do that. But hopefully you can understand why I made that statement.

It would help considerably to know what OS you’re using - is this a Mac as well?

Sorry, yes, I should have specified. Avogadro 1.99.0 arm64 from the github releases page, MacOS 14.4.

Arguably it’s a Qt bug, I suppose, given your explanation, and if there was a simple example I’d be happy to follow up there, but as the developer who actually knows the Qt calls you’re probably better placed to do that in an informative way.

No worries. In Avogadro 1.2, I wrote up some custom code to get the current language on Mac. That became un-necessary, but I’ll dig it up again.

FWIW, I just did a little test with PyQt6 (which I use for GitHub - libAtoms/dap: Display Atoms with Python), and the most naive thing I could think of

from PyQt6 import QtCore
print(QtCore.QLocale().name())

returned en_US, not Greek.

1 Like