Could not found why the is_rtl()
is not working properly, but found that wpml_is_rtl
is doing it’s own job,
so by adding this code to theme’s functions.php
everything seems to work fine:
if ( apply_filters( 'wpml_is_rtl', null) ) {
mu_fix_is_rtl(true);
}else {
add_filter('language_attributes','mu_alter_language_attributes');
mu_fix_is_rtl(false);
}
function mu_alter_language_attributes($output, $doctype){
return str_replace('rtl','ltr',$output);
}
function mu_fix_is_rtl($rtl){
global $wp_locale;
if($rtl){
$wp_locale->text_direction = 'rtl';
}else{
$wp_locale->text_direction = 'ltr';
}
}
Related Posts:
- WPML : how to determine manually the language in which a given page is displayed
- wp_pagenavi function parameters [closed]
- WPML – Change the language of large number of posts
- Cannot use object of type WP_Error as array
- Change ICL_LANGUAGE_CODE for WPML
- WPML – Pages not synced?
- WPML returning posts that are not published
- WPML: WP_Query + suppress_filters not working
- Translate front page (WPML) [closed]
- WPML translate without duplicating post [closed]
- WPML – Filter by individual or all languages
- Cannot locate specific link/string using String Translation with WPML? [closed]
- WPML custom post type – not translated
- Redirect user based on his language and country using WPML [closed]
- How to Automatically jump to the corresponding language of the page using WPML plugin in wordpress
- Translate Woocommerce automated emails
- Translation of one of the languages is not displayed on the site
- Latest WPML updates broke my wordpress post categories and menus [closed]
- WPML Translate term meta not synced
- WordPress Popular Posts with WPML
- How to configure the request language WP_Query wpml
- WPML – PHP Fatal error: Uncaught Error: Call to undefined function str_contains()
- Best WordPress Multi-language Plugin? [closed]
- Open Source replacement for WPML? [closed]
- WPML with WP_Query serving up all 3 languages [closed]
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- gettext does not translate when called in ajax
- How to remove WPML Generator Meta Tag by theme’s functions.php (override plugin function)? [closed]
- WPML: getting page title in different language
- Gettext details
- Best pratice to make taxonomy terms translatable without changing slugs?
- What is better for wordpress performace?
- Custom Post Type With Different Views
- Rewrite url for custom post type
- Checking current language in a function
- How to get posts in different language from WPML Plugin [closed]
- Add language/country code to each possible URL
- WPML Get url without outputting
- Comments waiting but no comments found
- Remove WPML’s home_url filter
- Need to give custom page template for each language in WPML
- How To Write An Inner Join With WP Query
- Make theme translatable for WPML
- Insights into WordPress Multi-Site, Domain Mapped, and Multilanguage site using WPML [closed]
- Unable to display multiple post types in same query (WPML WP_Query)
- How can override a add_filter of a plugin?
- Why isn’t WMPL correctly redirecting users based on browser language? [closed]
- Created pages not showing up in ‘All Pages’ list
- WordPress multilingual site using page-id.php files
- WPML Translating a term/taxonomy programmatically
- How to use WPML Plugin in contact form 7
- Woocommerce and different checkout field for different countries
- WPML Translated Term
- Find proper “text domain” within theme
- WPML in custom page templates
- Fetch ID’s associated with a custom post type when translated with WPML?
- Error 404 using wpml plugin
- Theme localization in WPML – .mo file error [closed]
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Manipulate Permalink
- Translate database content using __($message) function
- Should I include colon in my msgid in PO file?
- WPML custom string translation get outside of container
- WPML get permalink to the translated post from the original post
- WPML – Set language of inserted post
- How to list WP multisite languages
- Default string not appearing want to translate
- Mysql SELECT posts
- WPML Default Language User Meta [closed]
- Getting a PHP Notice when using Pods with WPML [closed]
- category filter doesn’t work in WPML
- WordPress Blank Screen Issue [closed]
- WPML & CFT: keeping custom field file to translation
- Category applied to pages, creates multiple breadcrumb entries after a search query (On the translated site)
- A simple method for disabling WPML language switcher when meeting specific circumstances [closed]
- How to force change Network site multi language subdirectory base URL?
- How to save post with different languages and linked them with WPML?
- Redirect some of the languages on a multi-language site
- Custom rewrite rules not working with WPML
- Bypass “supress_filters” in WP Query
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- x-wp-nonce across domains
- How to Translate a string of an array inside a class?
- Page and Post return 404 with custom taxonomy
- Rewrite CPT permalinks and include WPML language
- How to translate WordPress Emails?
- WPML language switcher for custom rewrite rules
- WPML Permalink missing language slug
- Country switcher, then option to choose language for that country [closed]
- Specific content by country in multiple languages
- Fixed values for same post translations
- Copying database tables to new database
- Hook in to add new post link wp admin?
- WPML – 404 Error when I try to pass GET parameters in my “different languages in directories” installation
- WPML customizing language selector [closed]
- Error when upload images larger than 1024px [closed]
- How do I translate string inside jQuery script with WPML?
- English version of my site show french strings [closed]
- Using Variable in WordPress Translate Functions
- Strange behavior with a redirect loop – involves WPML multi-language plugin