Arabic Language support

Hello,

I am using wordpress in English language and i am publishing in Arabic and it is OK, However some words are still appearing in English such as this page https://tarekrabaa.com/ar/?tag=برقية-منقولة-303

Do you know how can i replace those english words to Arabic without changing the language in Wordpress?

Hi there,

You need to translate the theme to Arabic to be able to see the auto-generated stuff such as Read More in Arabic. For more information:

If you do not want to change the Admin Language the translation should be done in the EN-GB file instead of the Arabic language file.

Thank you.

hi,

where is it the file EN-GB?

Hello There,

There is no en-gb file. Only x.pot file was provided with the theme. To be able to translate the theme, you must find the x.pot file and create __x__-en-GB.po and __x__-en-GB.mo using PoEdit. Please follow the instructions in the knowledge base article.

Thank you.

I am using X pro.
I want to just change few words in the english version of wordpress and not all the text.
I want to change the Word Archive and the Word Tag and the words “read more” only.

I need to change X.pot or Pro.pot?
How to change only for tarekrabaa.com/ar/ without impacting the language of my english website tarekrabaa.com?
If i do a change, both sites will be affected?
the /ar/ is the arabic version of my original website tarekrabaa.com.

I change the language in the general setting to Arabic, but still this english words appears!!
After searching, I discovered that those english words are coming from the TAG editor related to archive in yoast permalinks.
I replaced for the tag archive by arabic just by replacing the default tag permalink.
The problem remaining is the WORD in English Read More as shown in the picture.

Please check this URL https://tarekrabaa.com/ar/?tag=برقية-منقولة-303
It is an archive format coming from Yoast.
Does the X PRO has a specific archive page or settings?

Hi there,

The read more should be translatable within your language files. The code responsible for that is this,

return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';

Hence, you can translate it with mo/po files which usually named __x__-ar within’s theme’s language folder. But when I checked your site’s code, yes, it’s actually an English page where the strings are only changed to Arabic. It’s not a real translation. In that case, please add this code to your child theme’s functions.php

  function x_excerpt_string( $more ) {
    
    $stack = x_get_stack();

    if ( $stack == 'integrity' ) {
      return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'اقرأ أكثر', '__x__' ) . '</a></div>';
    } else if ( $stack == 'renew' ) {
      return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'اقرأ أكثر', '__x__' ) . '</a>';
    } else if ( $stack == 'icon' ) {
      return ' ...';
    } else if ( $stack == 'ethos' ) {
      return ' ...';
    }

  }
  add_filter( 'excerpt_more', 'x_excerpt_string' );

And since there is no actual translation, the code can’t detect the language being loading. Hence, it will remain اقرأ أكثر regardless of language.

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.