Changeset 3344 for trunk/bp-core.php
- Timestamp:
- 11/03/2010 10:34:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3343 r3344 1921 1921 function bp_core_load_buddypress_textdomain() { 1922 1922 $locale = apply_filters( 'buddypress_locale', get_locale() ); 1923 $mofile = BP_PLUGIN_DIR . "/bp-languages/buddypress-$locale.mo"; 1924 1925 if ( file_exists( $mofile ) ) 1926 load_textdomain( 'buddypress', $mofile ); 1923 $mofile = sprintf('buddypress-%s.mo', $locale); 1924 $mofile_global = WP_LANG_DIR . '/' . $mofile; 1925 $mofile_local = BP_PLUGIN_DIR . '/bp-languages/' . $mofile; 1926 1927 if ( file_exists( $mofile_global ) ) 1928 return load_textdomain( 'buddypress', $mofile_global ); 1929 elseif ( file_exists( $mofile_local ) ) 1930 return load_textdomain( 'buddypress', $mofile_local ); 1931 else 1932 return false; 1927 1933 } 1928 1934 add_action ( 'bp_loaded', 'bp_core_load_buddypress_textdomain', 2 );
Note: See TracChangeset
for help on using the changeset viewer.