i tried almost all plugins and not giving me what im looking for
im looking to click on a _GET link and convert site / content to another dir / lang and have 2 variable for each Lang as example :
$is_lang = htmlspecialchars($_SESSION['WPLANG'], ENT_QUOTES);
$is_en = htmlspecialchars('en_US', ENT_QUOTES);
$is_ar = htmlspecialchars('ar', ENT_QUOTES);
if(isset($is_lang) = $is_en):
--
-- show something
--
elseif(isset($is_lang) = $is_ar):
--
-- show something
--
endif;
so i end up with this wp-config :
$language = isset( $_GET['lang'] ) ? htmlspecialchars($_GET['lang'], ENT_QUOTES) : 'en';
switch ( $language ) {
case 'ar':
define( 'WPLANG', 'ar' );
$_SESSION['WPLANG'] = 'ar';
break;
case 'en':
default:
define( 'WPLANG', 'en_US' );
$_SESSION['WPLANG'] = 'en_US';
}
i came out with sloution:
Fist use this code in wp-config :
than you will get 2 lang ready but most your theme has rtl.css so in rtl.css put :
and now you can do if / else anywhere to show or hide or do your own trick with :