Recent searches
No recent searches
Hide custom guide links depending on language (location)
Answered
Posted Feb 10, 2022
We are releasing new language support for our app and help center. However, we have a customized Guide theme with direct links on the landing page of our Guide but it links to the English version and we don't want other languages having that options.
So we are trying to come up with some logic that says, if English then show links, if not then hide.
That is the basic idea behind it.
1
5
5 comments
Ifra Saqlain
Hi Michael Jenkins,
Using this code, you can hide your custom links from other languages and would be shown only in English local. You can use this idea in your script.js file.
Remove "LINK'S CLASS NAME" and add the link's class name, with a dot ( . ) because without dot ( . ) class-name won't work
e.g. $(" .language-link ")
or you can use tag-name without dot ( . )
e.g. $(" li > a ")
Hope it helps you.
Thanks
1
Angel Studios
I will give that a try, thank you for your help!
0
Angel Studios
This worked. I had to be a bit creative but was able to get it to work. One thing to note, when I replaced the name I had initially forgot the . at the beginning which broke it. In case anyone else runs into an issue.
1
Nicole Saunders
So glad you got things working, Angel Studios! Thanks for coming back and sharing your note as well.
0
Ifra Saqlain
@Michael Jenkins, thanks for notifying me of this, now I updated the code for a dot ( . ) for others. And glad to hear that it's working for you.
1