How to determine default language ID

riviere.edouardriviere.edouard SydneyMember
edited December 2017 in Back-end Development

Hi everyone,

I am currently working with the Content Management API to create content items. If I am correct, to create an item, it has to be done in 2 steps:
1. POST to create the item
2. PUT to update the item variant

In 2. I can't find how to get the id of a language. I can only do so by codename like:

Would anyone know how to determine languages IDs ?


  • Czech RepublicMember, Administrator, Kentico Staff admin

    Hi Edouard,

    As for the workflow of creating items, you're right. It is done in those two steps.

    As for the language ID, unfortunately, there is no way of finding it now in the UI of Kentico Cloud at the moment. I've checked that with the product team. At the same time, I've added the requirement to our product board.

    A reliable workaround of getting a language ID is to do a CM API GET request for variants of a translated item:[project ID]/items/[item ID]/variants

    In the response, you'll get the language ID for each of the variants. The default language always has an empty GUID value 00000000-0000-0000-0000-000000000000.

    (An example of such response:

    I'll do my best to bring the inability of getting the ID to the attention of the product teams. It does not make much sense not to display the ID in the UI.


  • riviere.edouardriviere.edouard SydneyMember

    Hi guys,

    Sorry to answer this late - just picking this up now.

    Thanks @JanLenoch for adding this as a possible requirement.

    @GeorgeKay You are correct, they are both the same and I could use the codename. However, I believe that the ID would not change, what if editors decide to change the name? I was thinking that ID was more a reliable value than code name.

    Is there a way to ensure that content editors can not change the default language?

  • GeorgeKayGeorgeKay Member
    edited December 2017

    Hi Edouard,

    You are correct, the internal IDs are guaranteed not to change and we will try to address the fact that those IDs are not easy to get.

    However, if you are concerned about the default language, then its internal ID is always 00000000-0000-0000-0000-000000000000 (you can look it up in our documentation as well).

    Kentico Cloud team

Sign In or Register to comment.