<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: content.language.languageTag not detecting language of blog summary pages in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498449#M25211</link>
    <description>&lt;P&gt;Thank you, that worked perfectly!&lt;/P&gt;</description>
    <pubDate>Tue, 21 Sep 2021 19:58:25 GMT</pubDate>
    <dc:creator>NicoleT</dc:creator>
    <dc:date>2021-09-21T19:58:25Z</dc:date>
    <item>
      <title>content.language.languageTag not detecting language of blog summary pages</title>
      <link>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498353#M25202</link>
      <description>&lt;P&gt;I have a featured news banner on the site that I only want to display on EN pages (as we only have press coverage in English). I have written the module to pull the most recent post on our News Blog that has the correct tags. However, the banner isn't showing on the newsroom or our blog page. I noticed this on another page we don't have a multi-language translation for, and when I set the page language to "EN" instead of the default "search" value on the page editor it fixed the problem. However since blog summary pages are not editable from the website page edit, I'm not sure how to fix these pages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I have for the featured news banner:&lt;/P&gt;&lt;P&gt;{% if content.language.languageTag == "en" %}&lt;BR /&gt;{% set tag_posts = blog_recent_tag_posts('24638575721', ['press-release'], 1) %}&lt;BR /&gt;{% for tag_post in tag_posts %}&lt;BR /&gt;&amp;lt;p class="featured-news"&amp;gt;&amp;lt;span class="featured-news_content"&amp;gt; &amp;lt;a style="color: #ffffff;" href='{{ tag_post.url }}'&amp;gt;{{ tag_post.name }}&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;i class="fal fa-arrow-circle-right featured-news_arrow"&amp;gt;&amp;lt;/i&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;{% endif %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 17:02:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498353#M25202</guid>
      <dc:creator>NicoleT</dc:creator>
      <dc:date>2021-09-21T17:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: content.language.languageTag not detecting language of blog summary pages</title>
      <link>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498435#M25208</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/122200"&gt;@NicoleT&lt;/a&gt;&amp;nbsp;! content.language.languageTag is not available on blog listings. We use the following code to retrieve the language tag on all page types (except for systempages)&lt;/P&gt;
&lt;PRE&gt;  {% set languageTag  = content.language.languageTag ? content.language.languageTag : group.language.language %}&lt;/PRE&gt;
&lt;P&gt;Add this code and change your if statement to {% if languageTag == "en" %}&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 19:37:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498435#M25208</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-09-21T19:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: content.language.languageTag not detecting language of blog summary pages</title>
      <link>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498449#M25211</link>
      <description>&lt;P&gt;Thank you, that worked perfectly!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 19:58:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/content-language-languageTag-not-detecting-language-of-blog/m-p/498449#M25211</guid>
      <dc:creator>NicoleT</dc:creator>
      <dc:date>2021-09-21T19:58:25Z</dc:date>
    </item>
  </channel>
</rss>

