# Setting locale via script to Serbian Latin language

**URL:** <https://forum.inductiveautomation.com/t/setting-locale-via-script-to-serbian-latin-language/19949>\
**Category:** Ignition\
**Created:** [October 3, 2018, 8:10am UTC](https://forum.inductiveautomation.com/t/setting-locale-via-script-to-serbian-latin-language/19949 "2018-10-03T08:10:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [October 3, 2018, 8:10am UTC](https://forum.inductiveautomation.com/t/setting-locale-via-script-to-serbian-latin-language/19949/1 "2018-10-03T08:10:05Z")

</div>

I have a project that requires a Serbian Latin language. I’ve added to translation manager the Serbian Latin language.  
If I select Serbian Latin language via Language selector component on the screen or on the login screen it gets correctly selected. And if I check with system.util.getLocale(), it shows locale code ‘sr\_\_#Latn’.

But if I want to set locale in client startup script or via button script with system.util.setLocale(‘sr\_\_#Latn’), I’ll get error: ‘Invalid locale format: sr\_\_#Latn’.  
😕

It appears to be a bug… but I don’t know where it is… in Ignition or in my head…😇  
Oh, and I’m using the latest version 7.9.9.

---

<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 3, 2018, 2:26pm UTC](https://forum.inductiveautomation.com/t/setting-locale-via-script-to-serbian-latin-language/19949/2 "2018-10-03T14:26:15Z")

</div>

I think it’s a bug in either Java or one of the libraries we use. I’ll do a bit of quick research and post the results…

---

<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 3, 2018, 3:13pm UTC](https://forum.inductiveautomation.com/t/setting-locale-via-script-to-serbian-latin-language/19949/3 "2018-10-03T15:13:01Z")

</div>

Looks like support for the script variants would be almost impossible to add in Ignition 7.9 because Java 6 doesn’t play well with the string representations of Locales. (The Language Selector works because we don’t use the string representation).

I’ll put in a ticket to have this fixed in 8.
