# Access regional variation of currently selected language?

**URL:** <https://forum.inductiveautomation.com/t/access-regional-variation-of-currently-selected-language/11902>\
**Category:** Ignition\
**Created:** [July 7, 2016, 2:28pm UTC](https://forum.inductiveautomation.com/t/access-regional-variation-of-currently-selected-language/11902 "2016-07-07T14:28:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [July 7, 2016, 2:28pm UTC](https://forum.inductiveautomation.com/t/access-regional-variation-of-currently-selected-language/11902/1 "2016-07-07T14:28:30Z")

</div>

Ignition 7.8.3  
Windows Server 2012

I am testing localization using regional variations. I have different translation text for a Button component Text property. I have different translations for English (Canada) and English (United Kingdom). When I use the language selector on a running window to switch between the two different languages (regional variations) the button text switches appropriately between my two different text strings.

I was hoping to be able to get the currently selected regional variation from Ignition but I haven’t found a way to do this. Is there a way to get the regional variation value? I expect the value for English (Canada) would be something like “en-ca” and English (United Kingdom) would be “en-gb”.

I see that there is a Language tag under System/Client/User, but the value remains “en” regardless of the selected regional variation.

If I query the TRANSLATIONTERMS table in the Raw Setting Viewer I see one entry for my button text with the LOCALE as “en\_GB” as I would expect. Strangely I don’t see an entry for “en\_CA” with the translation value for that region even though selecting English (Canada) from a running window does work appropriately.

Anyway, since the actual selection from a running window does work, I won’t question the internals, but I would like to know if there is a way to get the currently selected regional variation from Ignition?

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:** [July 7, 2016, 3:49pm UTC](https://forum.inductiveautomation.com/t/access-regional-variation-of-currently-selected-language/11902/2 "2016-07-07T15:49:53Z")

</div>

Here’s a script I put on a button:

`from java.util import Locale
print Locale.getDefault().getCountry()
print Locale.getDefault().getLanguage()`

The output when I’m in en\_CA is

`CA
en
`

You’ll find more methods you can call on Locale.getDefault() at [the Java docs for Locale](https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html).

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [July 7, 2016, 7:28pm UTC](https://forum.inductiveautomation.com/t/access-regional-variation-of-currently-selected-language/11902/3 "2016-07-07T19:28:15Z")

</div>

Thank you Kathy!
