Using HelpDocs with RTL Languages

Taylor Sloane Updated by Taylor Sloane

The HelpDocs text editor has a button you can click to switch text direction for RTL (right-to-left) languages like Hebrew. But there's some other parts of your template you'll want to edit to make everything appear in the right (pun intended) direction.

These snippets have been tested with the Boxed (v3next) template. If you're using another template there may be other customizations required.

The CSS

Paste this snippet into SettingsCode > CSS.
#main[data-hd-template="boxedinstantv3"] #header input {
padding-right: 3em !important;
}
@media (min-width: 70em) {
#header #search-container.search-responsive span {
margin-right: 6em !important;
}
#article .card.responsive-toc {
margin-right: 0px !important;
margin-left: 0px !important;
}
}
#article .tip-callout::before,
#article .note-callout::before,
#article .warning-callout::before {
margin-right: 40px !important;
}
#article .tip-callout,
#article .note-callout,
#article .warning-callout {
border-right-width: 5px !important;
border-left-width: 0 !important;
}

The JavaScript

Paste this snippet into Settings > Code > Javascript
<script type="text/javascript">
(function() {
$(function() {
// This assumes you're using the code in a multilingual setup, converting Hebrew to RTL.
// Contact HelpDocs support if you have trouble modifying it for your exact settings!
if ($('body').data().languageCode === 'he') {
$('html').attr('dir', 'rtl');
$('.dropdown-menu-right').removeClass('dropdown-menu-right');
$('#article #body p.meta').css('display', 'none !important;');
$('#category #articles p.card-text img').css('display', 'none !important;');
$('#category #articles p.card-text .text-muted').css('display', 'none !important;');
$('#home #categories #category p.card-text:last-of-type').css('display', 'none !important;');
}
});
})();
</script>

What did you think of this doc?

Using Different List Styles

Disabling Related Articles

Get in touch

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.