WordPress.org

Plugin Directory

Changeset 620386


Ignore:
Timestamp:
11/02/12 16:32:54 (18 months ago)
Author:
Chouby
Message:

text direction bug if the wp package is localized with a rtl language

Location:
polylang/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • polylang/trunk/include/core.php

    r619925 r620386  
    321321 
    322322            if (!($this->options['force_lang'] && $GLOBALS['wp_rewrite']->using_permalinks() && PLL_LANG_EARLY)) { 
    323                 if ($this->curlang->description != 'en_US') { 
    324                     // now we can load text domains with the right language 
    325                     $new_locale = get_locale(); 
    326                     foreach ($this->list_textdomains as $textdomain) 
    327                         load_textdomain( $textdomain['domain'], str_replace($this->default_locale, $new_locale, $textdomain['mo'])); 
    328  
    329                     // reinitializes wp_locale for weekdays and months, as well as for text direction 
    330                     unset($GLOBALS['wp_locale']); 
    331                     $GLOBALS['wp_locale'] = new WP_Locale();                 
    332                     $GLOBALS['wp_locale']->text_direction = get_metadata('term', $this->curlang->term_id, '_rtl', true) ? 'rtl' : 'ltr'; 
    333  
    334                     // translate labels of post types and taxonomies 
    335                     foreach ($GLOBALS['wp_taxonomies'] as $tax) 
    336                         $this->translate_labels($tax); 
    337                     foreach ($GLOBALS['wp_post_types'] as $pt) 
    338                         $this->translate_labels($pt); 
    339                 } 
     323                // now we can load text domains with the right language 
     324                $new_locale = get_locale(); 
     325                foreach ($this->list_textdomains as $textdomain) 
     326                    load_textdomain( $textdomain['domain'], str_replace($this->default_locale, $new_locale, $textdomain['mo'])); 
     327 
     328                // reinitializes wp_locale for weekdays and months, as well as for text direction 
     329                unset($GLOBALS['wp_locale']); 
     330                $GLOBALS['wp_locale'] = new WP_Locale();                 
     331                $GLOBALS['wp_locale']->text_direction = get_metadata('term', $this->curlang->term_id, '_rtl', true) ? 'rtl' : 'ltr'; 
     332 
     333                // translate labels of post types and taxonomies 
     334                foreach ($GLOBALS['wp_taxonomies'] as $tax) 
     335                    $this->translate_labels($tax); 
     336                foreach ($GLOBALS['wp_post_types'] as $pt) 
     337                    $this->translate_labels($pt); 
    340338 
    341339                // and finally load user defined strings 
  • polylang/trunk/polylang.php

    r619925 r620386  
    33Plugin Name: Polylang 
    44Plugin URI: http://wordpress.org/extend/plugins/polylang/ 
    5 Version: 0.9.4.5 
     5Version: 0.9.4.6 
    66Author: F. Demarle 
    77Description: Adds multilingual capability to Wordpress 
     
    2525*/ 
    2626 
    27 define('POLYLANG_VERSION', '0.9.4.5'); 
     27define('POLYLANG_VERSION', '0.9.4.6'); 
    2828define('PLL_MIN_WP_VERSION', '3.1'); 
    2929 
  • polylang/trunk/readme.txt

    r619925 r620386  
    66Tested up to: 3.4.2 
    77Stable tag: 0.9.4 
     8License: GPLv2 or later 
    89 
    910Polylang adds multilingual content management support to WordPress. 
     
    101102* Bug correction: query string added by other plugins is erased when adding the language code to all urls 
    102103* Bug correction: redirect erase 'POST' variables on homepage when adding the language code to all urls 
     104* Bug correction: English (en_US) loads rtl style when using a localized WordPress package with an rtl language 
    103105 
    104106= 0.9.4 (2012-10-23) = 
Note: See TracChangeset for help on using the changeset viewer.