# language\_variants – Variable issue Draft Status?

**URL:** <https://community.hubspot.com/t/language-variants-variable-issue-draft-status/125805>\
**Category:** CMS Development\
**Tags:** design-manager, free, professional, starter, enterprise\
**Created:** [February 11, 2025, 6:45am UTC](https://community.hubspot.com/t/language-variants-variable-issue-draft-status/125805 "2025-02-11T06:45:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![2CUBE-Studio](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/2cube-studio/32/63871_2.png) [@2CUBE-Studio](https://community.hubspot.com/u/2CUBE-Studio)\
**Post date:** [February 11, 2025, 6:45am UTC](https://community.hubspot.com/t/language-variants-variable-issue-draft-status/125805/1 "2025-02-11T06:45:05Z")

</div>

I’m building a **custom language switcher** using the language\_variants(‘localized’) function, but I’ve run into a limitation. It seems like there’s **no documented way** to check whether a localized page is a **draft** or **published**.

**Issue**

1. HubSpot has great documentation, but for deep-level coding scenarios like this, there is **no reference** to isDraft or any similar property for language variants.
2. The language\_variants() function returns localized pages, but I can’t find a way to **filter out draft pages**.

`<div class="header_lag_switcher">{% set languages = language_variants('localized') %}<div class="lag_switcher {{ "no-lang" if languages|length == 0 }}">{% set activeLanguage = languages|selectattr('isActive', true)|first %}<ul class="hs-language-switcher" role="menu">{% for language in languages %}<li class="{{ "lag__actvie" if language.languageCode|escape_attr == html_lang }}"><alang="{{ language.languageCode|escape_attr }}"hreflang="{{ language.languageCode|escape_attr }}"href="{{ language.localizedUrl|escape_url }}"data-value="{{ language.languageDisplayName|escape_attr }}">{{ language.languageCode|escape_attr }}</a></li>{% endfor %}</ul></div></div>`

 ![2CUBEStudio_0-1739256196522.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/8a6b441e3d0488b9d6602fbbe453f3bcb0265e8d.jpeg)

**What I Need Help With**

1. **Does HubSpot expose a way to check if a localized page is a draft?**
2. **Is there any undocumented property like isDraft or another method to filter drafts from language\_variants()?**
3. **If not, what’s the best workaround to ensure that draft pages don’t appear in the language switcher?**

Any insights would be greatly appreciated! If someone from HubSpot can confirm whether this is possible (or missing from documentation), that would be great. 🚀

Thanks in advance! 😊

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [February 11, 2025, 10:15pm UTC](https://community.hubspot.com/t/language-variants-variable-issue-draft-status/125805/2 "2025-02-11T22:15:06Z")

</div>

Hi, @2CUBE-Studio 👋 Thanks for posting. It’s a great question. I’d like to invite some of our community members to the conversation — hey @Anton @pm8rsh88 @BarryGrennan have you tackled anything similar?

Thank you very much for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![BarryGrennan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/barrygrennan/32/97794_2.png) [@BarryGrennan](https://community.hubspot.com/u/BarryGrennan)\
**Post date:** [February 12, 2025, 10:06am UTC](https://community.hubspot.com/t/language-variants-variable-issue-draft-status/125805/3 "2025-02-12T10:06:12Z")

</div>

Hi @2CUBE-Studio ,  
{{ content.state }} will show you on the individual page whether the page is “DRAFT” or “PUBLISHED\_OR\_SCHEDULED”.  
Incidentally you can dig into a lot of page info that wouldn’t necessarily be in the documentation by using the Developer Info on the cog menu on each page.

* * *

 ![profile2022a.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/7273a34ccfe3489fceebc8a36eca751481b59531.jpeg)

**Barry Grennan**

[Freelance HubSpot CMS Developer](https://www.seoanseo.ca?utm_source=HubSpotCommunity)

[Website](https://www.seoanseo.ca?utm_source=HubSpotCommunity) | [Contact](https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity) | [LinkedIn](https://www.linkedin.com/in/barrygrennan)
