<?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: New Hubspot Blog Search: How to manage more languages? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190151#M6013</link>
    <description>&lt;P&gt;I wrote a post &lt;A href="https://community.hubspot.com/t5/Content-Design-Questions/Custom-site-google-search/m-p/17525/highlight/true#M1660" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;on this forum discussing how to create a custom blog search. I'm not sure if that would help at all, if anything it would need to be expanded to account for different language versions, but it definitely does a decent job for a blog search. not a full site search though. Here is a &lt;A href="http://www.khaoticdigital.com/blog/simple-hubspot-blog-search-function" target="_self"&gt;blog post&lt;/A&gt; I wrote about it as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 07:57:06 GMT</pubDate>
    <dc:creator>Jsum</dc:creator>
    <dc:date>2018-05-16T07:57:06Z</dc:date>
    <item>
      <title>New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/189942#M5991</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I was looking at the new Hubspot blog search and i understood how&amp;nbsp;it works.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However i currently manage a multi-language blog in the same domain whit this structure:&lt;BR /&gt;&lt;BR /&gt;example.com&lt;/P&gt;&lt;P&gt;example.com/en&lt;BR /&gt;&lt;BR /&gt;Question is: if the Search Results page is a system page it must be unique, so how can i create different Search Result Pages for the two blogs?&lt;BR /&gt;&lt;BR /&gt;I solved the problem for 404 and 500 by using text in smart content modules but i don't think it will be a good solution in this case also.&lt;BR /&gt;&lt;BR /&gt;Has somebody experienced the same issue?&lt;BR /&gt;&lt;BR /&gt;Thanks all!&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 06:27:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/189942#M5991</guid>
      <dc:creator>RiccardoADV</dc:creator>
      <dc:date>2018-05-15T06:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190010#M6001</link>
      <description>&lt;P&gt;What blog search are you referencing?&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 14:45:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190010#M6001</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2018-05-15T14:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190015#M6002</link>
      <description>&lt;P&gt;Hi Jsum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply!&lt;BR /&gt;&lt;BR /&gt;Few weeks ago Hubspot relased a beta Blog Search Engine named Site Search.&lt;BR /&gt;&lt;BR /&gt;This is the email i received after asked for it to my agency's colleagues:&lt;BR /&gt;&lt;BR /&gt;"Hello!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You are receiving this email because you now have access to the site &lt;SPAN class="il"&gt;search&lt;/SPAN&gt; beta within your &lt;SPAN class="il"&gt;HubSpot&lt;/SPAN&gt; portal. Site &lt;SPAN class="il"&gt;search&lt;/SPAN&gt; allows you to easily index your content so your website visitors can &lt;SPAN class="il"&gt;search&lt;/SPAN&gt; for exactly what they are looking for.&amp;nbsp; You will be able to create a new Systems template for &lt;SPAN class="il"&gt;search&lt;/SPAN&gt;, which you can manage within Content Settings. The beta also gives you access to two new modules: &lt;SPAN class="il"&gt;Search&lt;/SPAN&gt; Field and &lt;SPAN class="il"&gt;Search&lt;/SPAN&gt; Results. While we create knowledge documentation for this beta feature, please feel free to refer to this document&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also note that access to site &lt;SPAN class="il"&gt;search&lt;/SPAN&gt; is reliant on you being part of the Design Manager Beta.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Alex"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&lt;A href="https://docs.google.com/document/d/19w9D9JqwsSG-X-gcteW5tS-8Ab_uxIABvN6hd1iVw9M/edit" target="_self"&gt;Site Search documentation here&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope it was useful!&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 14:53:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190015#M6002</guid>
      <dc:creator>RiccardoADV</dc:creator>
      <dc:date>2018-05-15T14:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190024#M6003</link>
      <description>&lt;P&gt;That is new.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Considering that it is so new that the documentation for it is in a google doc, I would say that you are going to have a hard time finding someone who knows anything about it. I'm stay pretty up-to-date with Hubspot and I didn't even know this was a thing. You might consider reaching out to the team at Hubspot that works on this, maybe through your account rep, to have them flush the docs out a bit. Multi-language is most likely not yet a supported feature.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 15:24:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190024#M6003</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2018-05-15T15:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190028#M6004</link>
      <description>&lt;P&gt;Ok&lt;BR /&gt;&lt;BR /&gt;You're right i will try to reach direclty Hubpost support.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;However is not the first time that there are troubles with&amp;nbsp;similar features, like for example other System Pages.&lt;BR /&gt;&lt;BR /&gt;It could be easier if the matching system will be on blogs, not on subdomain.&lt;BR /&gt;&lt;BR /&gt;I hope that some "Big Fish" from Hubspot will read this thread &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks Jsum and have a nice day!&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 15:31:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190028#M6004</guid>
      <dc:creator>RiccardoADV</dc:creator>
      <dc:date>2018-05-15T15:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190151#M6013</link>
      <description>&lt;P&gt;I wrote a post &lt;A href="https://community.hubspot.com/t5/Content-Design-Questions/Custom-site-google-search/m-p/17525/highlight/true#M1660" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;on this forum discussing how to create a custom blog search. I'm not sure if that would help at all, if anything it would need to be expanded to account for different language versions, but it definitely does a decent job for a blog search. not a full site search though. Here is a &lt;A href="http://www.khaoticdigital.com/blog/simple-hubspot-blog-search-function" target="_self"&gt;blog post&lt;/A&gt; I wrote about it as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 07:57:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190151#M6013</guid>
      <dc:creator>Jsum</dc:creator>
      <dc:date>2018-05-16T07:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190219#M6019</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/18643"&gt;@RiccardoADV&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try to use the query params like&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="c5"&gt;pathPrefix&lt;/SPAN&gt;&lt;SPAN class="c2"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;An example of this would be:&lt;BR /&gt;&lt;A href="https://blog.wsol.com/search?term=hubspot&amp;amp;pathPrefix=the" target="_blank"&gt;https://blog.wsol.com/search?term=hubspot&amp;amp;pathPrefix=the&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;this returns results on the site with the term of Hubspot and who's url starts with "the" like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;&lt;A href="https://blog.wsol.com/the-value-of-hubspot-certifications-infographic" target="_blank"&gt;https://blog.wsol.com/the-value-of-hubspot-certifications-infographic&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;So you could essentially&amp;nbsp;have the search with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;example.com/search?term=SearchTerm&lt;STRONG&gt;&amp;amp;pathPrefix=en/&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;Hopefully,&amp;nbsp;this helps point you in the right direction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="c2"&gt;-AJ&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 15:19:41 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/190219#M6019</guid>
      <dc:creator>AJLaPorte_diagr</dc:creator>
      <dc:date>2018-05-16T15:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/289578#M13507</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/18643"&gt;@RiccardoADV&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been experiecing the same problem with my blogs in English and German in Hubspot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already managed to fix the problem of showing only the content in the language of the page the user is in the moment - German content for who's in a German page using the search bar - with some custom HTML + Hubl and a custom JavaScript function (&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Site-search-beta/m-p/289575#M26864" target="_self"&gt;you can see the code in my answer here&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I haven't fixed yet the problem of a custom Search Results Page. I asked the Hubspot Support for some help in it, but this was their answer:&amp;nbsp;"&lt;SPAN&gt;Since the Search Results page is still a newer feature, multiple language is not available because you can only select one default search results page.".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My idea now is to create two Search Results Pages (one in each language) and run a JS function in the "data-search-path" part of HTML + Hubl in a custom Site Search Results.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div class="hs-search-results__pagination" data-search-path="{{ site_settings.content_search_results_page_path }}"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Let's see if this works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope this helps somehow,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Karina Sonaglio&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 13:09:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/289578#M13507</guid>
      <dc:creator>karinasonaglio</dc:creator>
      <dc:date>2019-09-04T13:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/338533#M16594</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92892"&gt;@karinasonaglio&lt;/a&gt;&amp;nbsp;- Did it work?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2020 19:50:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/338533#M16594</guid>
      <dc:creator>KLSutton</dc:creator>
      <dc:date>2020-05-12T19:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/340652#M16700</link>
      <description>&lt;P&gt;Unfortunately I didn't have much time to continue with it at that time, so for now the answer is no &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 19:08:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/340652#M16700</guid>
      <dc:creator>karinasonaglio</dc:creator>
      <dc:date>2020-05-20T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: New Hubspot Blog Search: How to manage more languages?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/608912#M28191</link>
      <description>&lt;P&gt;I know this post is pretty old, but for everyone who struggles with this topic, I want to share my solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all my case:&lt;/P&gt;&lt;P&gt;I want to implement a multi-language search-results-page for our website.&lt;BR /&gt;The primary language is English, so the URL for those pages does not have any language identifier in the slug.&lt;BR /&gt;&lt;A href="http://www.example.com/some-page" target="_blank" rel="noopener"&gt;www.example.com/some-page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The secundary language is German, so the URL needs the language identifier in the slug.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.example.com/de/some-page" target="_blank" rel="noopener"&gt;www.example.com/de/some-page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On several locations of the website we use hard coded phrases, which are translated with the help of the "html_lang" variable provided by HubSpot. To manage those hard coded phrases, I created a separate file called "lang.html", which holds those phrases in different languages like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  ...
  "search results": {
    "en": "Search Results",
    "de": "Suchergebnisse"
  }
  ...
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works pretty well on our entire website, because now I only need to insert this file in my custom coded base template and then call a translation by ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{{ lang['search results'][html_lang] }}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BUT this won't work on the search results page, since HubSpot does not provide to create a multi-lanugage version for those pages. So I needed to find a workaround. Therefore I setup the site search so it does contain the "language" param in the URL. So when I send a search query on the German website, I'll get redirected to the URL &lt;A href="http://www.example.com/search-results?term=something&amp;amp;language=de" target="_blank" rel="noopener"&gt;www.example.com/search-results?term=something&amp;amp;language=de&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Pretty nice, since I now just need a little bit of HubL to manipulate the page content of the search results page.&lt;/P&gt;&lt;P&gt;First I need this URL somehow and I found the variable "request.path_and_query", which works on every HubSpot Page. The rest is simple. Let me show you my code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{# Get language from URL ('...&amp;amp;language=en') #}
{# First, store URL params into a list, like ['term=something', 'language=de'] #}
{% set url_params = request.path_and_query|regex_replace("(.*)\\?", '')|split('&amp;amp;') %}

{# Next, attach needed params to a dict, to make it usable later, like {'language': 'de'} #}
{# Feel free to add more params if needed #}
{% set params = {} %}
{% for param in url_params %}
  {% set key_value = param|split('=')%}
  {% if key_value[0] == 'language' %}
    {% do params.update({
      'language': key_value[1]
    }) %}
  {% endif %}
{% endfor %}

{# Finally, set language for search results page from params dict created earlier #}
{% if params.language %}
  {% set html_lang = params.language %}
{% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Super nice, now I can use the "html_lang" variable again for things like "Search Results" which should be translated to "Suchergebnisse" by calling my language dictionary via ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;h1&amp;gt;{{ lang['search results'][html_lang] }}&amp;lt;/h1&amp;gt;

{# English Search Results #}
&amp;lt;h1&amp;gt;Search Results&amp;lt;/h1&amp;gt;

{# German Search Results #}
&amp;lt;h1&amp;gt;Suchergebnisse&amp;lt;/h1&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found this helpful, give it a thumbs up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;BR /&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 08:26:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/New-Hubspot-Blog-Search-How-to-manage-more-languages/m-p/608912#M28191</guid>
      <dc:creator>FabianRichter</dc:creator>
      <dc:date>2022-04-06T08:26:39Z</dc:date>
    </item>
  </channel>
</rss>

