How to have english digits in some posts with an rtl WordPress theme
How to have english digits in some posts with an rtl WordPress theme
How to have english digits in some posts with an rtl WordPress theme
The text_direction property of the WP_Locale class defaults to ‘ltr’ as per it’s declaration, then may be modified in the class’s init() initialization function in wp-includes/locale.php (near line #207 in WP 4.5) with the following logic: // Set text direction. if ( isset( $GLOBALS[‘text_direction’] ) ) $this->text_direction = $GLOBALS[‘text_direction’]; /* translators: ‘rtl’ or ‘ltr’. This … Read more
I have developed pages in that manner and if you are using WordPress functions and follow WP Codex it is same situation as if you developed custom page template. Just follow I18n for WordPress Developers and you will be fine.
Check the following function in your plugin: load_plugin_textdomain (); and be sure that the directory to languages folder is correct. This fixed the issue for above question.
Looking at the source load_plugin_textdomain takes three arguments: load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) It seems you are passing the absolute path to your language domain, as a relative path. Try: load_plugin_textdomain( ‘myplugin’, ABS_PATH_TO_LANGS_DIR);
WordPress is community translated. For a good number of languages, the translation is relatively complete and follows high quality standards. The codex page on WordPress in your language reports: WordPress in Urdu – اردو is ongoing, but slow. Need more contributors. So in essence: No, WP is not entirely translated to Urdu yet. You could … Read more
I’ve found what was going on, so I’m going to answer it for future reference, as it’s a common issue without clear solution. TL;DR: If the WPML language which’s not redirecting has a country code (eg. en-US instead of en) then you probably have the same bug. Jump to section “How to fix it”. The … Read more
You should hook with the locale filter: add_filter(‘locale’, ‘my_get_locale’); function my_get_locale($locale) { if ( is_page( 2846) ) { return “en_GB”; } return $locale; }
You need to use the function pll_the_languages() to get the language switcher. It has a bunch of arguments which you can use to customise the language switcher: $args is an optional array parameter. Options are: ‘dropdown’ => displays a list if set to 0, a dropdown list if set to 1 (default: 0) ‘show_names’ => … Read more
See Installing WordPress in Your Language in the codex.