# Access current language in ready hook

**URL:** <https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779>\
**Category:** Questions\
**Tags:** v4\
**Created:** [March 14, 2025, 11:30am UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779 "2025-03-14T11:30:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorisvdz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jorisvdz/32/7570_2.png) [@jorisvdz](https://forum.getkirby.com/u/jorisvdz)\
**Post date:** [March 14, 2025, 11:30am UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/1 "2025-03-14T11:30:52Z")

</div>

For some last-minute configuration, I would like to access the currently selected panel language in the Ready hook. I tried a lot of things, but unfortunately, I can’t get my head around it. So, not the user or site language, but the language of the content that is currently edited (for a multilingual site).

Any ideas…? Thanks!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 14, 2025, 11:55am UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/2 "2025-03-14T11:55:58Z")

</div>

I don’t think that’s possible, because changing the panel language happens client side, without loading the config

---

<div class="post-metadata">

**Author:** ![jorisvdz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jorisvdz/32/7570_2.png) [@jorisvdz](https://forum.getkirby.com/u/jorisvdz)\
**Post date:** [March 14, 2025, 12:12pm UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/3 "2025-03-14T12:12:02Z")

</div>

Hmm I see, thanks. The use case is that I would like to send the current language to the setting of the [Kirby Locator](https://github.com/sylvainjule/kirby-locator) field.

I also tried [setting the locale](https://github.com/sylvainjule/kirby-locator?tab=readme-ov-file#510-language) as follows:

```auto
language: '{{kirby.language}}'

```

but, unfortunately the value is not replaced with the current language.

Is it possible to have that value replaced with the current language? It is working if for example I set the placeholder for a text field:

```auto
placeholder: '{{kirby.language}}'

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 14, 2025, 12:36pm UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/4 "2025-03-14T12:36:33Z")

</div>

For all I can see, the `language` property of that field doesn’t support Kirby’s query language. Was just wondering why setting the language didn’t make any difference until I realized that it only works with mapbox 🙈

---

<div class="post-metadata">

**Author:** ![jorisvdz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jorisvdz/32/7570_2.png) [@jorisvdz](https://forum.getkirby.com/u/jorisvdz)\
**Post date:** [March 14, 2025, 12:49pm UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/5 "2025-03-14T12:49:03Z")

</div>

Haha, it is also used for the geocoding, so the name of the city will be in the language of the panel.

Okay, so to support this the plugin needs to support Kirby’s query language?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 14, 2025, 2:51pm UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/6 "2025-03-14T14:51:25Z")

</div>

> [@jorisvdz](#):
>
> Okay, so to support this the plugin needs to support Kirby’s query language?

Yes, the language option would need to support query language the it should work

---

<div class="post-metadata">

**Author:** ![jorisvdz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jorisvdz/32/7570_2.png) [@jorisvdz](https://forum.getkirby.com/u/jorisvdz)\
**Post date:** [March 14, 2025, 4:05pm UTC](https://forum.getkirby.com/t/access-current-language-in-ready-hook/33779/7 "2025-03-14T16:05:16Z")

</div>

@sylvainjule would you maybe consider adding this functionality? I think it would be a great feature to be able to save the geocoding data in the current language!
