# retrieving the current locale

**URL:** <https://forum.servoy.com/t/retrieving-the-current-locale/2169>\
**Category:** Classic Servoy\
**Created:** [July 7, 2004, 10:30am UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169 "2004-07-07T10:30:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 7, 2004, 10:30am UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/1 "2004-07-07T10:30:49Z")

</div>

Hello, is there a way to retrieve the current locale? I couldn’t figure out where/how. If there is not, it’d be nice to have a possibility under the i18n node.

Thanks  
Patrick

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [July 8, 2004, 1:41pm UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/2 "2004-07-08T13:41:36Z")

</div>

What would you do with it?  
In what kind of format are you expecting the result to be in?

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 8, 2004, 1:52pm UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/3 "2004-07-08T13:52:47Z")

</div>

for several value lists I have my own tables. Now when I start to internationalize my solution I have a problem with those.

Let’s say you have a list of countries for value lists. A German speaking person expects to see Niederlande, an English speaking person expects Netherlands.

How do I find out the language of my user if I can’t retrieve the locale? I’d like to use your approach of i18n with the messages table for my value list tables as well.

What I expect to get is the same that you use in the messages table (‘de’, ‘en’), but actually that doesn’t matter as long as it is consistent…

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [July 8, 2004, 2:41pm UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/4 "2004-07-08T14:41:02Z")

</div>

ahh getCurrentLanguage() is really wat you want.  
That i can add easy

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 8, 2004, 3:20pm UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/5 "2004-07-08T15:20:55Z")

</div>

I am sorry for my complicated explanation. very easy sounds great!

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [July 16, 2004, 11:22am UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/6 "2004-07-16T11:22:30Z")

</div>

added (2.1b5)

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 16, 2004, 11:57am UTC](https://forum.servoy.com/t/retrieving-the-current-locale/2169/7 "2004-07-16T11:57:22Z")

</div>

![:lol:]( "Laughing")
