# Return user language so to change the "locale" property

**URL:** <https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 18, 2024, 2:55pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464 "2024-10-18T14:55:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [October 18, 2024, 2:55pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/1 "2024-10-18T14:55:58Z")

</div>

Hello everybody,

I cannot find a way to read the language properties of the gateway users.  
I tried to use `system.user.getUser` but I don't have the language in the return variables.

I would like to read the setting language so to change directly the `locale` property of the session automatically.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/0468d7c50c88563ff9deac3db34b0b406b7317ce.png)

Thank you

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 18, 2024, 3:09pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/2 "2024-10-18T15:09:31Z")

</div>

Can you post what you tried (and your Ignition version)? Looking at the code, that property should exist in the User object returned.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [October 18, 2024, 4:10pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/3 "2024-10-18T16:10:58Z")

</div>

I'm not at work now, but I remember clearly that as return I had this 4 properties:  
Username  
First name  
Last name  
Roles

The code was very simple,

> user = system.user.getUser("", 'myuser' )  
> print user

The ignition version is 8.1.43.  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 18, 2024, 6:37pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/4 "2024-10-18T18:37:18Z")

</div>

afaik `user.get('language')` should work. Unfortunately I don't have time to test it right now.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [October 18, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/5 "2024-10-18T18:44:58Z")

</div>

No problem, thank you very much for the reply, I'll make some test tomorrow and I'll give you an update!

Have a nice day

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [October 21, 2024, 7:51am UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/6 "2024-10-21T07:51:58Z")

</div>

@KathyApplebaum,  
I can confirm that as you suggest everything works fine, thank you for the help.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [October 21, 2024, 3:42pm UTC](https://forum.inductiveautomation.com/t/return-user-language-so-to-change-the-locale-property/97464/7 "2024-10-21T15:42:06Z")

</div>

I forgot to say that I'm able to change the language according with the user settings doing this:

1. Create a custom session property
2. Bind the authentication username
3. Create on this custom property a Change Script that read the username and look for its language so to manage the \> Locale session property
