bbPress::load_textdomain()
Load the translation file for current language. Checks the deprecated languages folder inside the bbPress plugin first, and then the default WordPress languages folder.
Description Description
Note that custom translation files inside the bbPress plugin folder will be removed on bbPress updates. If you’re creating custom translation files, please use the global language folder.
Source Source
File: bbpress.php
public function load_textdomain() { // Define the old directory $old_dir = WP_LANG_DIR . '/bbpress/'; // Old location, deprecated in 2.6.0 if ( is_dir( $old_dir ) ) { // Get locale & file-name $type = is_admin() ? get_user_locale() : get_locale(); $locale = apply_filters( 'plugin_locale', $type, $this->domain ); $mofile = sprintf( '%1$s-%2$s.mo', $this->domain, $locale ); // Look in global /wp-content/languages/bbpress/ folder load_textdomain( $this->domain, $old_dir . $mofile ); } // Look in global /wp-content/languages/plugins/ load_plugin_textdomain( $this->domain, false, $this->lang_base ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |