<?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: Multilingual search function in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291661#M13624</link>
    <description>&lt;P&gt;Hey Dan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can clone the "Site Search Input" module to create your own custom search and add in hidden inputs to specify parameters. So you could add in the limit like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;input type="hidden" name="limit" value="5"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or the language like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;input type="hidden" name="language" value="en-gb"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add it in below HubSpot's parameters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="language parameter.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/19939i0DA9EB5E67A8DC87/image-size/large?v=v2&amp;amp;px=999" role="button" title="language parameter.png" alt="language parameter.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm struggling a little with is setting the language condition to check for the page language. In theory you should be able to use&amp;nbsp;&lt;A href="https://designers.hubspot.com/docs/hubl/hubl-supported-variables" target="_self"&gt;content.language.languageTag&lt;/A&gt; to get the language like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if content.language.languageTag == "en-gb" %}
  &amp;lt;input type="hidden" name="language" value="en-gb"&amp;gt;
{% endif %}&lt;/PRE&gt;
&lt;P&gt;But it doesn't seem to be working for me :S&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose you could also set it directly in the module similar to the settings HubSpot has for content types.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Stephanie O'Gay Garcia&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;HubSpot CMS Design &amp;amp; Development&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity" target="_blank"&gt;Website&lt;/A&gt; | &lt;A href="http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity" target="_blank"&gt;Contact&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#32C43F"&gt;&lt;I&gt;If this helped, please mark it as the solution to your question, thanks!&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 13:36:48 GMT</pubDate>
    <dc:creator>Stephanie-OG</dc:creator>
    <dc:date>2019-09-17T13:36:48Z</dc:date>
    <item>
      <title>Multilingual search function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291627#M13622</link>
      <description>&lt;P&gt;Hi, I am trying to target language-specific search results in the hubspot search function on this site&amp;nbsp;&lt;A href="https://www.cogencyglobal.com/en-gb/" target="_blank"&gt;https://www.cogencyglobal.com/en-gb/&lt;/A&gt;&amp;nbsp;at the moment it shows everything on the us site and uk site when using the site search functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know when I add the prefix&amp;nbsp;&lt;A href="https://www.cogencyglobal.com/search?term=court+searches&amp;amp;language=en-gb" target="_blank"&gt;&amp;amp;language=en-gb&lt;/A&gt;&amp;nbsp;to the end of a search it works. EG:&amp;nbsp;&lt;A href="https://www.cogencyglobal.com/search?term=court+searches&amp;amp;language=en-gb" target="_blank"&gt;https://www.cogencyglobal.com/search?term=court+searches&amp;amp;language=en-gb&lt;/A&gt;&amp;nbsp;but I'm unsure about how to actually implement this so it automatically adds the prefix if you're using the search function on the UK site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a side note - I also need a UK version on the search results page - this isn't an option in HubSpot, are there any workarounds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 09:39:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291627#M13622</guid>
      <dc:creator>DanBQ</dc:creator>
      <dc:date>2019-09-17T09:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Multilingual search function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291661#M13624</link>
      <description>&lt;P&gt;Hey Dan,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can clone the "Site Search Input" module to create your own custom search and add in hidden inputs to specify parameters. So you could add in the limit like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;input type="hidden" name="limit" value="5"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or the language like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;input type="hidden" name="language" value="en-gb"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add it in below HubSpot's parameters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="language parameter.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/19939i0DA9EB5E67A8DC87/image-size/large?v=v2&amp;amp;px=999" role="button" title="language parameter.png" alt="language parameter.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm struggling a little with is setting the language condition to check for the page language. In theory you should be able to use&amp;nbsp;&lt;A href="https://designers.hubspot.com/docs/hubl/hubl-supported-variables" target="_self"&gt;content.language.languageTag&lt;/A&gt; to get the language like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% if content.language.languageTag == "en-gb" %}
  &amp;lt;input type="hidden" name="language" value="en-gb"&amp;gt;
{% endif %}&lt;/PRE&gt;
&lt;P&gt;But it doesn't seem to be working for me :S&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose you could also set it directly in the module similar to the settings HubSpot has for content types.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Stephanie O'Gay Garcia&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;HubSpot CMS Design &amp;amp; Development&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity" target="_blank"&gt;Website&lt;/A&gt; | &lt;A href="http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity" target="_blank"&gt;Contact&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#32C43F"&gt;&lt;I&gt;If this helped, please mark it as the solution to your question, thanks!&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 13:36:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291661#M13624</guid>
      <dc:creator>Stephanie-OG</dc:creator>
      <dc:date>2019-09-17T13:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multilingual search function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291665#M13625</link>
      <description>&lt;P&gt;Perfect solution, thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:19:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291665#M13625</guid>
      <dc:creator>DanBQ</dc:creator>
      <dc:date>2019-09-17T14:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multilingual search function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291724#M13633</link>
      <description>&lt;P&gt;I'm glad that helped!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.hubspot.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; I also wrote a post that hopefully anyone else who comes across this might find useful: &lt;A title="Add parameters to your HubSpot site search input module" href="https://www.stephanieogaygarcia.com/hubspot-cms-development/add-parameters-to-your-hubspot-site-search-input-module?utm_source=HubSpotCommunity" target="_self"&gt;Add parameters to your HubSpot site search input module&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;Stephanie O'Gay Garcia&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;HubSpot CMS Design &amp;amp; Development&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.stephanieogaygarcia.com?utm_source=HubSpotCommunity" target="_blank" rel="noopener"&gt;Website&lt;/A&gt; | &lt;A href="http://www.stephanieogaygarcia.com/contact?utm_source=HubSpotCommunity" target="_blank" rel="noopener"&gt;Contact&lt;/A&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 19:33:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/291724#M13633</guid>
      <dc:creator>Stephanie-OG</dc:creator>
      <dc:date>2019-09-17T19:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multilingual search function</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/1049692#M40851</link>
      <description>&lt;P&gt;Hi Dan,&lt;BR /&gt;Maybe I'm a little late (I've only been on hubspot for 2 weeks) but I have a good solution for your question regarding multilingual search :&lt;BR /&gt;1) just create an empty web page. The slug maybe /search or /en/search for example&lt;/P&gt;&lt;P&gt;2) add two modules by drag&amp;amp;drop : Search Input and Search Result&lt;/P&gt;&lt;P&gt;3) in the parameters of the Search Input you can choose on which page you want to see your result =&amp;gt; choose this page : this the most important point. In the end you won't need to use the global prameter regarding the search result if you do that on every search input you have on your websi&lt;SPAN&gt;te.&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 264px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/128459i72E38AA9B3CA411B/image-dimensions/264x392?v=v2" width="264" height="392" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;4) you can create as many multilingual page of this page as needed. Obviously you will have to change the search result page in the parameter of the search input module of each page to match with the right language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To improve the solution, you can clone the module search Input to add a filter '?language=xxx' to ensure that each search input will search only in the language of the page. I did this to avoid multiple results for the same blog with different languages. Example :&amp;nbsp;&lt;A href="https://quadza.software/en/blog" target="_blank" rel="noopener"&gt;Blog Quadza Software&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In my case I have onyl two languages : en &amp;amp; fr&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yves_LAURISSE_0-1727965288501.png" style="width: 773px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/128462i888BE27B79820D95/image-dimensions/773x169?v=v2" width="773" height="169" role="button" title="Yves_LAURISSE_0-1727965288501.png" alt="Yves_LAURISSE_0-1727965288501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;{% if content.language.languageTag == "en" %}&lt;BR /&gt;&amp;lt;input type="hidden" name="language" value="en"&amp;gt;&lt;BR /&gt;{% elif content.language.languageTag == "fr" %}&lt;BR /&gt;&amp;lt;input type="hidden" name="language" value="fr"&amp;gt;&lt;BR /&gt;{% endif %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 14:23:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Multilingual-search-function/m-p/1049692#M40851</guid>
      <dc:creator>Yves_LAURISSE</dc:creator>
      <dc:date>2024-10-03T14:23:40Z</dc:date>
    </item>
  </channel>
</rss>

