# Retrieve Content language in CKEditor plugin

**URL:** <https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [June 29, 2023, 9:50am UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017 "2023-06-29T09:50:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![flip](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flip/32/1736_2.png) [@flip](https://community.bloomreach.com/u/flip)\
**Post date:** [June 29, 2023, 9:50am UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/1 "2023-06-29T09:50:56Z")

</div>

Hi there,

I’m writing a CKEditor plugin in Javascript for a multilingual site. I need to be able to retrieve the content language (not the interface language) for the document that is currently being edited.

Is there anyway to do this?

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [June 30, 2023, 12:44pm UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/2 "2023-06-30T12:44:51Z")

</div>

Hi,

you posted in the content SaaS forum, but what you want can only be achieved in the PaaS/OnPrem version of the product. For that you can find the locale as a property (hippotranslation:locale) of the node.

---

<div class="post-metadata">

**Author:** ![flip](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flip/32/1736_2.png) [@flip](https://community.bloomreach.com/u/flip)\
**Post date:** [June 30, 2023, 3:28pm UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/3 "2023-06-30T15:28:29Z")

</div>

Thanks for the reply. How would I access the hippotranslation:locale property from Javascript? Do I need to do anything to make it available to Javascript? Maybe it is possible to interpolate it into the CKEditor config?

I’m working on a custom plugin for CKEditor so I would need to access it from there.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [July 3, 2023, 1:48pm UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/4 "2023-07-03T13:48:29Z")

</div>

I’m not really well versed in CKeditor plugins. Most likely you will have to do something on the Java side to expose this, but the only advice I can give you is to look at the cms code. Again, this will only be possible in PaaS/OnPrem.

---

<div class="post-metadata">

**Author:** ![flip](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flip/32/1736_2.png) [@flip](https://community.bloomreach.com/u/flip)\
**Post date:** [July 4, 2023, 10:09am UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/5 "2023-07-04T10:09:32Z")

</div>

The CKEditor part I can figure out. My question really is what I would need to do on the Java side to expose this?

(we have the PaaS version, sorry for posting in the wrong forum)

---

<div class="post-metadata">

**Author:** ![flip](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/flip/32/1736_2.png) [@flip](https://community.bloomreach.com/u/flip)\
**Post date:** [July 26, 2023, 11:11am UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/6 "2023-07-26T11:11:53Z")

</div>

So, how would I expose `hippotranslation:locale` so it can be accessed by Javascript when editing a document? Either by inserting a script tag or if I can set a HTML attribute somewhere I can pick it up too. Any idea’s?

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [July 31, 2023, 1:55pm UTC](https://community.bloomreach.com/t/retrieve-content-language-in-ckeditor-plugin/4017/7 "2023-07-31T13:55:34Z")

</div>

Hi,

I’m sorry no one seems to have an answer for you. You should check the cms code, there are ckeditor plugins in there. Perhaps it will reveal to you how to do this.
