RTL & Arabic Support
WP LinkCanvas has full right-to-left (RTL) support built in. Arabic, Hebrew, Farsi, Urdu, and other RTL languages render correctly without any extra configuration.
How RTL is detected#
WP LinkCanvas marks a language as RTL based on its language code. The following codes are always treated as RTL:
ar— Arabiche— Hebrewfa— Farsi / Persianur— Urduckb— Central Kurdish (Sorani)ps— Pashtosd— Sindhi
When using WPML or Polylang, the RTL flag is read directly from those plugins’ language objects, so any language they mark as RTL is automatically RTL in WP LinkCanvas too.
What changes in RTL mode#
When a visitor views an RTL language version of the bio page, WP LinkCanvas adds body.nlb-rtl to the page and sets direction: rtl on the root. The following layout changes apply automatically:
Text direction — all text flows right-to-left. Titles, subtitles, bio text, and link labels are all affected.
Links list — the links list and each link row get direction: rtl. Link text aligns correctly for Arabic script.
Social icons — the social icon row direction is reversed.
Showcase rail — the scroll arrows swap sides. The left arrow moves to the right edge and the right arrow moves to the left edge. The arrow icons also flip 180 degrees so they point in the correct direction.
Enhanced link badge — the icon badge on image cards anchors to the left side instead of the right.
QR code widget — moves from the bottom-right corner to the bottom-left corner.
Admin editor RTL#
The bio page editor also applies RTL layout when editing an RTL language tab. The display name, subtitle, bio text, and link label fields all get dir="rtl" when the active language tab is an RTL language. This means Arabic text entered in the editor appears right-aligned as you type, matching how it will look on the public page.
Custom fonts for Arabic#
The default font stack does not include Arabic-specific fonts. To use a web font optimised for Arabic, add a Custom CSS rule on the bio page:
css
body.nlb-page.nlb-rtl .nlb-title,
body.nlb-page.nlb-rtl .nlb-subtitle,
body.nlb-page.nlb-rtl .nlb-bio,
body.nlb-page.nlb-rtl .nlb-link__text {
font-family: "Cairo", "Tajawal", "Noto Sans Arabic", sans-serif;
}
Load the font via a @import rule in the same Custom CSS field, or enqueue it in your theme.
RTL with multilanguage plugins#
When using WPML, Polylang, or TranslatePress, each language has its own bio page URL. The Arabic version (yoursite.com/ar/links) automatically renders in RTL. The English version (yoursite.com/links) renders in LTR. No configuration is needed — the language detection and RTL flag are set per-request based on the URL.
Supported RTL layout scenarios#
- Single-language site with Arabic as the default language — the bio page always renders in RTL
- Multilanguage site with Arabic as one of several languages — only the Arabic URL renders in RTL, all others render in LTR
- Manual language mode with an Arabic language code configured — RTL applies when that language is active