Setting WPLANG from a plugin

In wp-includes/l10n.php you will find the function get_locale(). It offers a filter; you can set the language and ignore the constant: function get_locale() { global $locale; if ( isset( $locale ) ) return apply_filters( ‘locale’, $locale ); // WPLANG is defined in wp-config. if ( defined( ‘WPLANG’ ) ) $locale = WPLANG; // If multisite, … Read more

Having a two language website

Convert your site to a multisite, then … Create a second site. Set the site language to Persian in Options/General. Set the language of the first site to English. You can install a plugin to link translated posts like MultilingualPress (disclosure: I was the lead developer for that plugin for a long time). You can … Read more

How to load rtl.css file without changing lanuage to persian in wordpress?

# if you want to enqueue your style in you theme, rtl or else function theme_enqueue_scripts() { # enqueue style in your theme wp_register_style( ‘rtl’, get_template_directory_uri() . ‘/css/rtl.css’, array(), ‘1.0.0’ ); wp_enqueue_style( ‘rtl’ ); } add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_scripts’ ); # if you need enqueue this, just if theme is rtl , copy this function function … Read more

techhipbettruvabetnorabahisbahis forumueduseduseduseduedueduseduedueduedus