load_translations

The BuddyPress load translations function.

Description

&load_translations( (string) $mo_filename ); 

Parameters (1)

0. $mo_filename (string)
The mo filename.

Usage

  1. if ( !function_exists( 'load_translations' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/pomo/sample/app.php'; 
  3.  
  4. // The mo filename. 
  5. $mo_filename = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = load_translations($mo_filename); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/backpress/pomo/sample/app.php  
  1. function &load_translations($mo_filename) { 
  2. if (is_readable($mo_filename)) { 
  3. $translations = new MO(); 
  4. $translations->import_from_file($mo_filename); 
  5. } else { 
  6. $translations = new Translations(); 
  7. return $translations;