Plugin Directory

Changeset 465671


Ignore:
Timestamp:
11/21/2011 02:44:20 PM (14 years ago)
Author:
camaleo
Message:

1.1 minor fix to the class file to be used on the noprofeed.org site

File:
1 edited

Legend:

Unmodified
Added
Removed
  • noprofeedorg/trunk/class.noprofeed.php

    r465625 r465671  
    241241             */
    242242//          load_plugin_textdomain($this->locale, dirname(__FILE__), dirname(__FILE__) . '/langs/');
    243             if(WPLANG != '') {
     243
     244            $pageLang = '';
     245            if(function_exists('icl_get_languages')) {
     246
     247                $languages = icl_get_languages('');
     248
     249                foreach($languages as $l) {
     250
     251                    if($l['active']) {
     252
     253                        $pageLang = $l['language_code'] . '_' . strtoupper($l['language_code']);
     254                    }
     255                }
     256            }
     257//echo '$pageLang['.$pageLang.']';
     258
     259            if($pageLang != '') {
     260
     261                load_textdomain( $this->locale, dirname(__FILE__) . '/langs/' . $pageLang . '.mo' );
     262            }
     263            else if(WPLANG != '') {
    244264
    245265                load_textdomain( $this->locale, dirname(__FILE__) . '/langs/' . WPLANG . '.mo' );
Note: See TracChangeset for help on using the changeset viewer.