Skip to:
Content

BuddyPress.org

Changeset 1393 for trunk/bp-core.php


Ignore:
Timestamp:
04/23/2009 09:14:12 AM (17 years ago)
Author:
apeatling
Message:

Reverting the localization changes, the previous fix seems to be causing problems. Will re-address this in 1.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1391 r1393  
    2323if ( !defined( 'CUSTOM_USER_META_TABLE' ) )
    2424    define( 'CUSTOM_USER_META_TABLE', $wpdb->base_prefix . 'usermeta' );
     25
     26/* Load the language file */
     27if ( file_exists( BP_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' ) )
     28    load_textdomain( 'buddypress', BP_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' );
    2529
    2630/* Load the files containing functions that we globally will need. */
     
    241245}
    242246add_action( 'admin_menu', 'bp_core_check_installed' );
    243 
    244 /**
    245  * bp_core_load_textdomain()
    246  *
    247  * Load a global text domain regardless of blog specific settings.
    248  * This stops the admin bar translating to the local blog language for a user.
    249  *
    250  * @package BuddyPress Core
    251  * @uses load_textdomain() Loads the localization file.
    252  */
    253 function bp_core_load_textdomain() {
    254     if ( defined( 'WPLANG' ) )
    255         $locale = WPLANG;
    256     else
    257         $locale = 'en_US';
    258 
    259     $locale = apply_filters( 'bp_core_buddypress_locale', $locale );
    260 
    261     if ( file_exists( BP_PLUGIN_DIR . '/bp-languages/buddypress-' . $locale . '.mo' ) )
    262         load_textdomain( 'buddypress', BP_PLUGIN_DIR . '/bp-languages/buddypress-' . $locale . '.mo' );
    263 }
    264 add_action( 'plugins_loaded', 'bp_core_load_textdomain', 1 );
    265247
    266248/**
Note: See TracChangeset for help on using the changeset viewer.