[Skip to main content](#vessel-content)

#   Restrict search results to currently set language

##

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Away](/forum/user/69623-ntv)

Less More

- Posts: 48
- Thank you received: 6
-

1 month 3 weeks ago [\#100000033](#100000033) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000033 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")* was created by *[NTV](/forum/user/69623-ntv "View NTV's Profile")*

-- HikaShop version -- : 6.6.0
-- Joomla version -- : 6.1.3
-- PHP version -- : 8.3.6
-- Browser(s) name and version -- : Firefox 156.0

Hi,
I have a website that currently supports two languages: German and English.

I want to restrict search results to show only our English products when the language is set to English and vice-versa.

I checked the Smart Search Index and saw that each search result has a language value.

How do I set these values correctly for HikaShop products and then filter my results accordingly?

Thanks in advance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14323
-
-

1 month 3 weeks ago [\#100000040](#100000040) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000040 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")*

Hello,

HikaShop products don't have a language of their own: the "Smart Search - HikaShop Products" plugin indexes each product for every language, which is why your German and English books appear in the search of both languages. On a multilingual site, Joomla's Smart Search already shows only the content of the current language, so what is missing is the language information on the products.

We have added this in the next version of HikaShop, 6.7.0 which will be released in October. In the translation popup of a product (the language flags at the top of the product edit form), there is now a "Hide in this language" checkbox. A product hidden in a language is left out of the product listings and of the Smart Search results in that language, its page answers "product not found", and it can't be added to the cart there. Its variants follow it.
Once you have updated to 6.7.0:
1. In Components &gt; HikaShop &gt; System &gt; Configuration, in the Languages section, set "Activate the edition of content in multiple languages" to Yes, so that the translation popups of the products appear.
2. For each German book, open its English translation popup and tick "Hide in this language". For each English book, do the same in its German translation popup. Leave the products that should appear in both languages as they are.
3. In Components &gt; Smart Search, clear the index and index again.
The English search will then only list your English books (and the products you didn't hide), and the German search only the German ones.
This isn't possible yet in your current version 6.6.0. Product translations need the Essential or Business edition of HikaShop.

The following user(s) said Thank You: [NTV](/forum/user/69623-ntv "View NTV's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Away](/forum/user/69623-ntv)

Less More

- Posts: 48
- Thank you received: 6
-

1 month 3 weeks ago [\#100000055](#100000055) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  Replied by *[NTV](/forum/user/69623-ntv "View NTV's Profile")* on topic *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000055 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")*

Hi,
cool that the feature is coming in the next version.

Will it be possible to set this via mass action?
We have a lot of products which would mean a lot of manual labor, otherwise.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14323
-
-

1 month 3 weeks ago [\#100000056](#100000056) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000056 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")*

Hi,

Yes, this can be done in bulk, with the mass actions already built into HikaShop's product listing (Components &gt; HikaShop &gt; Products, select the products, then Actions), once you are on 6.7.0; no extra development is needed for it.

If you can select your German books and your English books separately, for example by category, the quickest way is the "Update the values" action: choose the column product_hidden_languages, set the type to "A text", and enter ,en-GB, to hide the selection in English or ,de-DE, to hide it in German, then run it on the whole selection at once.

If each product needs a different value, use "Export CSV" instead: pick the columns product_code and product_hidden_languages, download the file, fill in the value for each line in a spreadsheet, then bring it back in with the "CSV import" action and tick Save.

To hide a product in several languages, put them all in the same value, for example ,de-DE,fr-FR,.

The codes must match the language tags used on your site, which you can check under System &gt; Languages in Joomla, commonly en-GB and de-DE.

Also, if you use Smart Search, you'll have to delete the index and reindex in the Smart Search component.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Away](/forum/user/69623-ntv)

Less More

- Posts: 48
- Thank you received: 6
-

3 hours 29 minutes ago [\#100000814](#100000814) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  Replied by *[NTV](/forum/user/69623-ntv "View NTV's Profile")* on topic *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000814 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")*

Hi,
we updated to 6.8.2.

Then, I completed the three steps you mentioned for one english product with the following results:
-SmartSearch still generates only one index entry for the product. Its Language is set to 'All'
-This link works when the site is toggled to English and gives a 404 when toggled to German

Did I do something wrong? Is there a bug?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14323
-
-

13 minutes ago [\#100000815](#100000815) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Restrict search results to currently set language](/forum/10-translation/100000009-restrict-search-results-to-currently-set-language#100000815 "-- HikaShop version -- : 6.6.0 -- Joomla version -- : 6.1.3 -- PHP version -- : 8.3.6 -- Browser(s) name and version -- : Firefox 156.0  Hi, I have a website that currently supports two languages: German and English.  I want to restrict search results to show only our English products when the language is set to English and vice-versa.  I checked the Smart Search Index and saw that each search result has a language value.  How do I set these values correctly for HikaShop products and then filter my results accordingly?  Thanks in advance.")*

Hello,

You didn't do anything wrong in the steps, and the frontend part is working on your site: the product page answers 404 in German, which only happens when HikaShop sees the product as hidden in German with the translation of products active.

What doesn't match is the Smart Search index. With "Activate the edition of content in multiple languages" set to Yes and two published content languages, the "Smart Search - HikaShop Products" plugin no longer creates one entry with the language "All": it creates one entry per language (one with English (en-GB) and one with German (de-DE)), and none in a language where the product is hidden. We tested this on a Joomla site with HikaShop 6.8.2: after clearing the index and indexing again, a product hidden in one language only has an entry in the other language, and the other products have one entry per language. An entry with the language "All" is what the plugin makes when it doesn't see several languages to index for, which is why your index looks like it did before the update. On your public site, the German search still lists the English edition of the Python regius book, so this is the case for your other products too, not only the one you hid.

To find what differs on your site, could you check and tell us:

1. In Components &gt; Smart Search, do you start the indexing with the Index button in the toolbar after Maintenance &gt; Clear Index, or is it done by a cron job or the command line (php cli/joomla.php finder:index)?

2. In System &gt; Manage &gt; Content Languages, are both English and German published, and which language codes do they have?

3. In System &gt; Manage &gt; Plugins, search for "Smart Search": is "Smart Search - HikaShop Products" enabled, and is there any other Smart Search plugin for HikaShop products?

4. Do you use Falang or another translation extension on the site?

5. After Clear Index and Index, in Components &gt; Smart Search &gt; Index, search for the title of one product you did not hide: does it show one line with "All", or two lines, one for English and one for German?

With these answers we can tell you what to change, or fix it if it's a problem on our side.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzEwMDAwMDAwOS1yZXN0cmljdC1zZWFyY2gtcmVzdWx0cy10by1jdXJyZW50bHktc2V0LWxhbmd1YWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
