RTL Language Support
Smart Phone Field includes full right-to-left layout support. If your WooCommerce store serves customers in Arabic, Hebrew, Farsi, Urdu, or any other RTL language, the phone field adapts its layout automatically to suit right-to-left reading direction.
How RTL Support Works#
Smart Phone Field detects the text direction of the active language in WordPress. When the site is rendering in RTL mode, the plugin applies a mirrored layout to the phone field without any configuration needed from you.
This detection happens at the WordPress level using the standard is_rtl() function. If your theme and WPML or Polylang are correctly configured for an RTL language, Smart Phone Field will follow automatically.
What Changes in RTL Mode#
Field layout — The flag and dial code button moves to the right side of the field. The phone number input extends to the left. This matches the natural reading direction for RTL languages where the most significant element appears on the right.
Dropdown alignment — The country dropdown opens and aligns to the right edge of the field rather than the left. The flag, country name, and dial code inside each row are arranged for RTL reading.
Search box — The search input inside the dropdown switches to RTL alignment. Text the customer types appears right-aligned.
Scrollbar — The dropdown scrollbar moves to the left side of the dropdown panel, which is the correct position for RTL interfaces.
No Configuration Required#
RTL support is built into the plugin and activates automatically. You do not need to enable it, add CSS, or configure anything. As long as your WordPress site is correctly set to an RTL language, the phone field will render in RTL mode.
Supported RTL Languages#
Any language that WordPress recognises as RTL will trigger RTL mode in Smart Phone Field. This includes but is not limited to:
- Arabic (ar)
- Hebrew (he)
- Farsi / Persian (fa)
- Urdu (ur)
- Pashto (ps)
- Sindhi (sd)
- Uighur (ug)
Multilingual Stores with Mixed Directions#
If you run a multilingual store where some languages are LTR and others are RTL, Smart Phone Field handles this correctly. The field renders in RTL for RTL languages and in standard LTR for all other languages, switching with each page load based on the active language.
There is no conflict between the two directions — the layout is determined fresh for each page request based on the active language at that moment.
Testing RTL Mode#
To verify RTL mode is working correctly on your store:
- Switch your site to an RTL language using WPML or Polylang
- Visit your checkout page
- Confirm the flag button appears on the right side of the phone field
- Open the country dropdown and confirm the layout is right-aligned
If the field is not switching to RTL layout, confirm that your active language is correctly set as RTL in your translation plugin settings and that your theme is also rendering in RTL mode.