Title: Localization issue
Last modified: August 21, 2016

---

# Localization issue

 *  [Stevesan](https://wordpress.org/support/users/stevesan/)
 * (@stevesan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/)
 * Hi.
 * Thanks for this excellent plugin. It was a requested plugin for a theme I bought,
   and I think it’s great!
 * However, I have an issue. I use the Codestyling Localization plugin. It alerts
   me that your plugin isn’t loading properly, see message below.
 * If you can solve this issue, I’ll PP you some bucks! 🙂
 * Thanks!
 * Steve
 * Message from the Codestyling Localization plugin:
 * Loading Issue: Author is using load_textdomain instead of load_plugin_textdomain
   function. This may break behavior of WordPress, because some filters and actions
   won’t be executed anymore. Please contact the Author about that.
 * [http://wordpress.org/plugins/contact-form-7/](http://wordpress.org/plugins/contact-form-7/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999220)
 * It’s a wrong alert. Please contact the Codestyling Localization author about 
   that.
 *  Thread Starter [Stevesan](https://wordpress.org/support/users/stevesan/)
 * (@stevesan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999225)
 * Ahh… I see! Thanks for answering. Bucks coming soon! 🙂
 * Steve
 *  Thread Starter [Stevesan](https://wordpress.org/support/users/stevesan/)
 * (@stevesan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999354)
 * Hi again.
 * I contacted the author of Codestyling Localization. He checked your code and 
   says it’s not a false alert. See his response below.
 * Steve
 * This is not a false alert.
    Here the code snippet from actual “Contact Form 7”
   code version 3.4.2:
 *     ```
       function wpcf7_get_contact_form_default_pack( $args = '' ) {
       	global $l10n;
   
       	$defaults = array( 'locale' => null, 'title' => '' );
       	$args = wp_parse_args( $args, $defaults );
   
       	$locale = $args['locale'];
       	$title = $args['title'];
   
       	if ( $locale && $locale != get_locale() ) {
       		$mo_orig = $l10n['wpcf7'];
       		unset( $l10n['wpcf7'] );
   
       		if ( 'en_US' != $locale ) {
       			$mofile = wpcf7_plugin_path( 'languages/wpcf7-' . $locale . '.mo' );
       			if ( ! load_textdomain( 'wpcf7', $mofile ) ) {
       				$l10n['wpcf7'] = $mo_orig;
       				unset( $mo_orig );
       			}
       		}
       	}
       ```
   
 * As can be seen, it uses indeed:
    `load_textdomain( 'wpcf7', $mofile )`
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999363)
 * The `load_textdomain` is not used **instead of** `load_plugin_textdomain`. Also,
   use of `load_textdomain` can’t break behavior of WordPress. It merely makes Codestyling
   Localization impossible to interfere in other plugins process. As you may know
   from the code above, the `load_textdomain` is used for loading a translation 
   for a specific language (not current locale), there is no need for Codestyling
   Localization to interfere in.
 *  Thread Starter [Stevesan](https://wordpress.org/support/users/stevesan/)
 * (@stevesan)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999365)
 * Just don’t shoot the messenger. 🙂
 * I guess why Codestyling Localization bothers with this code is because it is 
   a translation plugin. But the thing is I’m no code guru (to say the least) so
   I’m just trying to find out what is going on.
 * I’ll let the author know your point above.
 * Thanks
 * Steve
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999388)
 * Sorry, I didn’t intend to shoot you! And forgot to say thank you for taking the
   trouble of telling the plugin author about this 🙂
 * Actually I often see this Codestyling Localization message and got tired of explaining
   every time. Maybe the author assumes that every `load_textdomain` in other plugins
   is misuse of `load_plugin_textdomain`.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Localization issue’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [load_plugin_textdomain](https://wordpress.org/support/topic-tag/load_plugin_textdomain/)
 * [load_textdomain](https://wordpress.org/support/topic-tag/load_textdomain/)

 * 6 replies
 * 2 participants
 * Last reply from: [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/localization-issue-3/#post-3999388)
 * Status: not resolved