<?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: Subscription Preferences Page Header and Footer Language Variants in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/409555#M21174</link>
    <description>&lt;P&gt;Thanks for your help&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This variable helps me check the language settings of the page, but as the subscription preferences page is a system page, and I can't use multiple different pages with different language settings for that page, this won't work in this case. I think I need a similar if statement that checks the user's browser language.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 12:05:02 GMT</pubDate>
    <dc:creator>MatthewShepherd</dc:creator>
    <dc:date>2021-02-16T12:05:02Z</dc:date>
    <item>
      <title>Subscription Preferences Page Header and Footer Language Variants</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/408897#M21139</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to create language variants for the header and footer of my subscription preferences template (email_subscription_preferences_page).&amp;nbsp; This template extends the base.html template, which contains global partials for the header and footer areas of the template.&amp;nbsp; If I could set different language variants of my subscription preferences page I could set language variants via the global content editor, but as I can't set language variants for this system page (that I know of) is there another way to detect browser language in HubL and perhaps load different translated partial templates based on that language?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 16:35:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/408897#M21139</guid>
      <dc:creator>MatthewShepherd</dc:creator>
      <dc:date>2021-02-12T16:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Subscription Preferences Page Header and Footer Language Variants</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/408902#M21141</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1377"&gt;@MatthewShepherd&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've did something like this a while ago:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if content.language.languageTag == "en" %}
english navigation
{% elif content.language.languageTag == "de" %}
german navigation
...
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe it helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:01:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/408902#M21141</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2021-02-12T17:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Subscription Preferences Page Header and Footer Language Variants</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/409555#M21174</link>
      <description>&lt;P&gt;Thanks for your help&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This variable helps me check the language settings of the page, but as the subscription preferences page is a system page, and I can't use multiple different pages with different language settings for that page, this won't work in this case. I think I need a similar if statement that checks the user's browser language.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 12:05:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/409555#M21174</guid>
      <dc:creator>MatthewShepherd</dc:creator>
      <dc:date>2021-02-16T12:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Subscription Preferences Page Header and Footer Language Variants</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/409560#M21175</link>
      <description>&lt;P&gt;I believe I have found my solution with the following&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    {% set lang = request.headers['accept-language']|split(',') %}
    {% set pblang = lang[0] %} 
    {% if pblang == "cs" %}
      {% global_partial path="../partials/footer_cs.html" %}
    {% elif pblang == "de" %}
      {% global_partial path="../partials/footer_de.html" %}  
    {% else %}
      {% global_partial path="../partials/footer.html" %}
    {% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using this code throughout my template I can pull in different partial templates that match the user's primary browser language.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 12:57:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Subscription-Preferences-Page-Header-and-Footer-Language/m-p/409560#M21175</guid>
      <dc:creator>MatthewShepherd</dc:creator>
      <dc:date>2021-02-16T12:57:29Z</dc:date>
    </item>
  </channel>
</rss>

