Scripting User Language in Perspective

If you go into the gateway and attempt to edit a user, ‘Language’ is listed as a user property.
In the Perspective app I’m working on, we have a User Management page created but I don’t see a system scripting function in the help documents for accessing/updating the ‘Language’ user property.
Ideally, I want to have that property be what sets the default language for the user upon page startup. Is there a way to access it?

Hi @agriner, could you use: user.set("language", "value")?

Not tried it personally, but I came to this conclusion from the example in: system.user.getNewUser - Ignition User Manual 8.1 - Ignition Documentation

and based on the PyUser class information: PyUser

Please let me know if it works :slight_smile:

p.s. The Expanse reference in the getNewUser() example always makes me chuckle :laughing: kudos to whoever wrote that entry.

3 Likes

The Expanse reference in the getNewUser() example always makes me chuckle :laughing: kudos to whoever wrote that entry.

That was me. I didn’t think our training department would use my internal notes as is. :flushed:

3 Likes

Oh, and what @matthew.ayre suggested should definitely work. Make sure the value is an ISO language code for best results. (e.g. English is “en”, Spanish is “es”)

1 Like

That worked great! Thank you both!

2 Likes