WordPress.org

Plugin Directory

Changeset 610153


Ignore:
Timestamp:
10/09/12 19:37:17 (19 months ago)
Author:
Chouby
Message:

test strings translations

Location:
polylang/trunk
Files:
2 edited

Legend:

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

    r609733 r610153  
    302302    // as done by qtranslate: define the locale with the action 'plugins_loaded', but in this case, the language must be specified in the url. 
    303303    function load_textdomains() { 
    304         global $wp_rewrite, $l10n; 
    305  
    306304        // our override_load_textdomain filter has done its job. let's remove it before calling load_textdomain 
    307305        remove_filter('override_load_textdomain', array(&$this, 'mofile')); 
     
    319317            $this->add_language_filters(); 
    320318 
    321             if (!($this->options['force_lang'] && $wp_rewrite->using_permalinks() && PLL_LANG_EARLY) && $this->curlang->description != 'en_US') { 
    322                 // now we can load text domains with the right language 
    323                 $new_locale = get_locale(); 
    324                 foreach ($this->list_textdomains as $textdomain) 
    325                     load_textdomain( $textdomain['domain'], str_replace($this->default_locale, $new_locale, $textdomain['mo'])); 
    326  
    327                 // reinitializes wp_locale for weekdays and months, as well as for text direction 
    328                 unset($GLOBALS['wp_locale']); 
    329                 $GLOBALS['wp_locale'] = new WP_Locale();                 
    330                 $GLOBALS['wp_locale']->text_direction = get_metadata('term', $this->curlang->term_id, '_rtl', true) ? 'rtl' : 'ltr'; 
    331  
    332                 // translate labels of post types and taxonomies 
    333                 foreach ($GLOBALS['wp_taxonomies'] as $tax) 
    334                     $this->translate_labels($tax); 
    335                 foreach ($GLOBALS['wp_post_types'] as $pt) 
    336                     $this->translate_labels($pt); 
     319            if (!($this->options['force_lang'] && $GLOBALS['wp_rewrite']->using_permalinks() && PLL_LANG_EARLY)) { 
     320                if ($this->curlang->description != 'en_US') { 
     321                    // now we can load text domains with the right language 
     322                    $new_locale = get_locale(); 
     323                    foreach ($this->list_textdomains as $textdomain) 
     324                        load_textdomain( $textdomain['domain'], str_replace($this->default_locale, $new_locale, $textdomain['mo'])); 
     325 
     326                    // reinitializes wp_locale for weekdays and months, as well as for text direction 
     327                    unset($GLOBALS['wp_locale']); 
     328                    $GLOBALS['wp_locale'] = new WP_Locale();                 
     329                    $GLOBALS['wp_locale']->text_direction = get_metadata('term', $this->curlang->term_id, '_rtl', true) ? 'rtl' : 'ltr'; 
     330 
     331                    // translate labels of post types and taxonomies 
     332                    foreach ($GLOBALS['wp_taxonomies'] as $tax) 
     333                        $this->translate_labels($tax); 
     334                    foreach ($GLOBALS['wp_post_types'] as $pt) 
     335                        $this->translate_labels($pt); 
     336                } 
    337337 
    338338                // and finally load user defined strings 
    339                 $l10n['pll_string'] = $this->mo_import($this->curlang); 
    340             } 
    341  
     339                $GLOBALS['l10n']['pll_string'] = $this->mo_import($this->curlang); 
     340            } 
    342341        } 
    343342 
  • polylang/trunk/polylang.php

    r609733 r610153  
    33Plugin Name: Polylang 
    44Plugin URI: http://wordpress.org/extend/plugins/polylang/ 
    5 Version: 0.9.3 
     5Version: 0.9.3.1 
    66Author: F. Demarle 
    77Description: Adds multilingual capability to Wordpress 
     
    2525*/ 
    2626 
    27 define('POLYLANG_VERSION', '0.9.3'); 
     27define('POLYLANG_VERSION', '0.9.3.1'); 
    2828define('PLL_MIN_WP_VERSION', '3.1'); 
    2929 
Note: See TracChangeset for help on using the changeset viewer.