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
- Best WordPress Multi-language Plugin? [closed]
- Open Source replacement for WPML? [closed]
- 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
- How to get posts in different language from WPML Plugin [closed]
- Add language/country code to each possible URL
- Remove WPML’s home_url filter
- 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?
- WordPress multilingual site using page-id.php files
- WPML Translating a term/taxonomy programmatically
- How to use WPML Plugin in contact form 7
- WPML in custom page templates
- Fetch ID’s associated with a custom post type when translated with WPML?
- Error 404 using wpml plugin
- 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 get permalink to the translated post from the original post
- How to list WP multisite languages
- Getting a PHP Notice when using Pods with WPML [closed]
- WPML & CFT: keeping custom field file to translation
- A simple method for disabling WPML language switcher when meeting specific circumstances [closed]
- How to save post with different languages and linked them with WPML?
- Redirect some of the languages on a multi-language site
- Bypass “supress_filters” in WP Query
- Page and Post return 404 with custom taxonomy
- Rewrite CPT permalinks and include WPML language
- WPML language switcher for custom rewrite rules
- WPML Permalink missing language slug
- Specific content by country in multiple languages
- WPML customizing language selector [closed]
- English version of my site show french strings [closed]
- Strange behavior with a redirect loop – involves WPML multi-language plugin
- WPML and Yoast SEO setup on a wordpress site is not working properly
- How to translate text in function.php with WPML [closed]
- Create header.php redirect in WordPress and with WPML
- After disabling WPML multi currency, the currency is still handled by the WPML
- Translate arguments of a user added custom code [closed]
- WPML language tags (Qtranslate feature) [closed]
- Borrowing of Previously Translated Strings by Child Plugin
- How to display WP Query filters?
- WPML icl_register_string() throws fatal error but works [closed]
- WordPress Translation to french, at -> à not working
- WP-e-commerce (getshopped) – Annoying permalink issue [closed]
- WP-e-commerce (getshopped) Hebrew language files – where can I get them? [closed]
- How do I duplicate a single wpmu site?
- How to automatically translate plugin using translate.wordpress.org
- Keep source page URL parameters on custom link menu item
- Line Breaks are stripped off when direction property is found
- Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
- An inactive plugin causes an HTTP 404 issue on a translated post – WPML
- append currency to URL
- Translate string inside twig template
- $.ajax results in 403 forbidden
- I have defined 2 text strings, how do I use them in my posts?
- How do I split a single WPML site with 6 languages (English is Main) into Multisite with 5 subfolders
- PHP Warning adding menu
- add .html to custom post type with WPML
- Is there a way to ensure browser automatically translates page content to another language (via Google Translate)?
- Is there a way to move WPML scripts in footer?
- WPML admin texts with serialized objects
- Reuse links in a post across different languages
- Archive page for a custom post type using WPML
- Hardcoding links to wp_nav_menu
- same comment list for two posts
- Use specific language for comment section
- WPML : how to pick a featured image only once for different languages?
- Does WPML translate numbers automatically, or do I have to do the string translation? [closed]
- ACF + WPML: How to translate date fields?
- WPML & Events Manager translatable fields after duplication
- WPML – how to translate user profile fields with icl_t()? [closed]
- How to translate the blog date in the Avada theme [closed]
- Many big issues in the website, WP_Debug not showing
- Translate Woocommerce tab
- Development time to Install and Configure WPML (https://wpml.org/) [closed]