How to hide Help Center Community topics by language (Gather)
At this time, the HC Community is treated differently than the rest of the Help Center - especially when it comes to supporting multiple languages. With the Zendesk team, we came up with an awesome little hack that will hide certain topics based on languages, so that only people using that specific language will be able to see relevant information.
In your HC settings navigate to the JS tab and insert the following code:
// Hides Topic other language from the topic-list
var cpt = 0;
switch(currentLanguage) {
case 'Français':
cpt = 0;
$("ul.topic-list li").each(function() {
if(cpt & 1)
$(this).hide();
cpt++;
});
break;
case 'English (US)':
cpt = 0;
$("ul.topic-list li").each(function() {
if(!(cpt & 1))
$(this).hide();
cpt++;
});
break;
}
For every additional language, you simply add
break;
case 'LANGUAGE': // Enter language here
cpt = 0;
$("ul.topic-list li").each(function() {
if(!(cpt & 1))
$(this).hide();
cpt++;
This will hide topics being viewed, but it will not hide the topics when submitting a new idea in the Community.
The good news is, however, that the topic the user decides to post in is indeed the default choice in the submit form, so they should not be exposed to any other topics anyway.
-
Okay, I understand now.. Thank you !
Please sign in to leave a comment.
31 Comments