Skip to:
Content

BuddyPress.org

Changeset 3392


Ignore:
Timestamp:
11/11/2010 06:34:54 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2243. Back ported from trunk. Props francescolaffi, boonebgorges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core.php

    r3379 r3392  
    19641964 */
    19651965function bp_core_load_buddypress_textdomain() {
    1966     $locale = apply_filters( 'buddypress_locale', get_locale() );
    1967     $mofile = BP_PLUGIN_DIR . "/bp-languages/buddypress-$locale.mo";
    1968 
    1969     if ( file_exists( $mofile ) )
    1970         load_textdomain( 'buddypress', $mofile );
     1966    $locale        = apply_filters( 'buddypress_locale', get_locale() );
     1967    $mofile        = sprintf( 'buddypress-%s.mo', $locale );
     1968    $mofile_global = WP_LANG_DIR . '/' . $mofile;
     1969    $mofile_local  = BP_PLUGIN_DIR . '/bp-languages/' . $mofile;
     1970
     1971    if ( file_exists( $mofile_global ) )
     1972        return load_textdomain( 'buddypress', $mofile_global );
     1973    elseif ( file_exists( $mofile_local ) )
     1974        return load_textdomain( 'buddypress', $mofile_local );
     1975    else
     1976        return false;
    19711977}
    19721978add_action ( 'bp_loaded', 'bp_core_load_buddypress_textdomain', 2 );
Note: See TracChangeset for help on using the changeset viewer.