Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 2 replies, has 0 voices.

Last updated by Bobby 13 hours, 29 minutes ago.

Assisted by: Bobby.

Author Posts
July 2, 2025 at 3:38 pm #17194070

metroW

Background of the issue:
I am trying to add the dir="rtl" attribute to pages on our site that have been translated into Dari. Currently, pages translated into Arabic have this attribute, but pages translated into Dari do not.

I have provided lines of code from our site for reference:
<html dir="rtl" lang="ar" id="html" class="" itemtype="hidden link" itemscope="" style="--scrollbar-offset: 15px;">

<html lang="prs" id="html" class="" itemtype="hidden link" itemscope="" style="--scrollbar-offset: 15px;">.

The site I need help with is hidden link.

Symptoms:
Pages translated into Dari do not include the dir="rtl" attribute.

Questions:
Is there a way to apply the dir="rtl" attribute to pages we translate into Dari?

July 2, 2025 at 7:08 pm #17194616

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Thank you for contacting WPML support. While you wait for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or see if I can help with the issue quickly.

I assume you created a custom language for Dari. I say this because WPML does not include Dari as a built-in language. One approach to resolving this issue is to map it to Arabic. You can do it in WPML -> Languages -> Site Languages -> Edit languages (link). Please read more about this here.

https://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/

Please share your site's Debug information if you need further help with this issue. You can read about it here: http://wpml.org/faq/provide-debug-information-faster-support/

Regards,
Itamar.

July 2, 2025 at 9:24 pm #17194883

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

WPML is fully compatible with RTL languages. While WPML allows you to translate into RTL or use RTL, the handling of RTL content is dependent on the theme's CSS as well as the language being registered as an RTL language.

Currently Dari is not officially supported by WordPress, therefore when adding it, there is nothing letting WordPress know that it's a RTL language.

Please review the following documentation along with the WP Codex on how you can configure the language to be RTL.

https://wpml.org/documentation/theme-compatibility/build-rtl-wordpress-themes/

https://codex.wordpress.org/Right-to-Left_Language_Support