Hey There,
Do you have two separate WordPress installation? If yes, then you will need to set the languages for both installation to English and then in each of the child themes, you will need to edit the language attribute.
So in your main site, most probably in https://tarekrabaa.com/wp-content/themes/pro-child/views/header/
, the child theme must have this base.php
file.
<?php
// =============================================================================
// VIEWS/HEADER/BASE.PHP
// -----------------------------------------------------------------------------
// Declares the DOCTYPE for the site, includes the <head>, opens the <body>
// element as well as the .x-root <div> and .x-site <div>.
// =============================================================================
$x_root_atts = x_atts( apply_filters( 'x_root_atts', array( 'id' => 'x-root', 'class' => 'x-root' ) ) );
$x_site_atts = x_atts( apply_filters( 'x_site_atts', array( 'id' => 'x-site', 'class' => 'x-site site' ) ) );
?>
<!DOCTYPE html>
<html class="no-js" lang="ar" prefix="og: http://ogp.me/ns#">
<head>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div <?php echo $x_root_atts; ?>>
<?php do_action( 'x_before_site_begin' ); ?>
<div <?php echo $x_site_atts; ?>>
<?php do_action( 'x_after_site_begin' ); ?>
And in your other separate install, https://tarekrabaa.com/en/wp-content/themes/pro-child/views/header/
, must have this code:
<?php
// =============================================================================
// VIEWS/HEADER/BASE.PHP
// -----------------------------------------------------------------------------
// Declares the DOCTYPE for the site, includes the <head>, opens the <body>
// element as well as the .x-root <div> and .x-site <div>.
// =============================================================================
$x_root_atts = x_atts( apply_filters( 'x_root_atts', array( 'id' => 'x-root', 'class' => 'x-root' ) ) );
$x_site_atts = x_atts( apply_filters( 'x_site_atts', array( 'id' => 'x-site', 'class' => 'x-site site' ) ) );
?>
<!DOCTYPE html>
<html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div <?php echo $x_root_atts; ?>>
<?php do_action( 'x_before_site_begin' ); ?>
<div <?php echo $x_site_atts; ?>>
<?php do_action( 'x_after_site_begin' ); ?>
This will only if you have a separate installation. If you only have one, you will need a language selector plugin to be able to accomplish what you have in mind. Having to install a 3rd party plugin such as WPML should work and less hustle and any conflicts or issues.
Hope this helps.