bb_load_default_textdomain

Loads default translated strings based on locale.

Description

bb_load_default_textdomain(); 

Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The translated (.mo) file is named based off of the locale.


Usage

  1. if ( !function_exists( 'bb_load_default_textdomain' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-l10n.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_load_default_textdomain(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-l10n.php  
  1. function bb_load_default_textdomain() { 
  2. $locale = bb_get_locale(); 
  3.  
  4. $mofile = BB_LANG_DIR . "/$locale.mo"; 
  5.  
  6. load_textdomain('default', $mofile);