Providing links in Zendesk theme that default to users' current language
답변함I use a custom theme that includes an option to have home page elements called blocks. These blocks can link to the main areas of our help center like Community, Documentation, and News. Issue is that the links I'm using on the Documentation block will take someone to the English version of our documentation whether they have chosen English or German from our Zendesk help center. This behavior is obvious because the link I'm using quite literally has "en-us" in the URL. Question is, is there a way to provide a link for this "custom block element" that will default to whatever language the user is currently in? Forgive me if the question is rudimentary, I don't have a lot of experience with code :/
PS, I am currently on the Gather Legacy plan
-
Hi Jason,
I'm unsure of this custom theme that you are using, but talking about links, in general, I can tell you that you can indeed make a link that is not forcing a language.
This link is forcing language: /hc/en-us/categories/123456789_my_category
This link is not forcing language: /hc/categories/123456789_my_categoryI hope this helps you. :-)
#helpsome regards,
Louise Dissing
Team Lead @ helphouse.io -
Thank you for the response. I did try removing the "en-us" in the url and it unfortunately didn't work. The result was a 404 error when clicking on the linked element. I am going to take a look at it today with someone who knows more than I and if we can find an answer I will be sure to circle back with the resolution.
-
Hi Jason,
Perhaps you created an absolute link instead of a relative one.
In your link only write what I send, and not your Zendesk domain in front of it.
It did the trick on our Guide at least! :-)If you still cannot figure out why, could you then copy-paste some part of the code into here?
#helpsome regards,
Louise Dissing
Team Lead @ helphouse.io -
You are (absolutely) correct. I ended up with categories/123456789_my_category and all is working as expected. I wasn't aware that I could provide a link in that way so I also learned something.
Thank you Louise!
-
Hi Jason,
Great! Glad I could help! :-)
#helpsome regards,
Louise Dissing
Team Lead @ helphouse.io
댓글을 남기려면 로그인하세요.
5 댓글