Title: Debug Bar Localization
Author: Juliette Reinders Folmer
Published: <strong>2016 年 1 月 13 日</strong>
Last modified: 2016 年 4 月 30 日

---

搜索插件

![](https://ps.w.org/debug-bar-localization/assets/banner-772x250.png?rev=1327261)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/debug-bar-localization/assets/icon-256x256.png?rev=1327261)

# Debug Bar Localization

 作者：[Juliette Reinders Folmer](https://profiles.wordpress.org/jrf/)

[下载](https://downloads.wordpress.org/plugin/debug-bar-localization.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/debug-bar-localization/#description)
 * [评价](https://cn.wordpress.org/plugins/debug-bar-localization/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/debug-bar-localization/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/debug-bar-localization/#developers)

 [支持](https://wordpress.org/support/plugin/debug-bar-localization/)

## 描述

Debug Bar Localization adds a new panel to the Debug Bar which displays information
on the locale for your install and the language files loaded.

Additionally it will show you:

 * The installed languages.
 * Which text-domains were called from translation functions while no `load_..._textdomain()`
   call was found for that text-domain.
 * For which text-domains `load_..._textdomain()` was called more than once.
 * Which files WP tried to load to obtain a translation and whether this was successful.
 * If successful: how many translated strings were found and when the translation
   was last updated.

> **Did you know ?**
> During the creating and continued development of this plugin a – localization 
> related – performance issue and a bug were found in WordPress itself.
>  For each
> of these I’ve send in patches. The end-results are now in core.
> Want to know more ? Here they are: [Trac 35439](https://core.trac.wordpress.org/ticket/35439)
> and [Trac 35442](https://core.trac.wordpress.org/ticket/35442) (and related: [Trac 21319](https://core.trac.wordpress.org/ticket/21319))

#### 重要

This plugin requires the [Debug Bar](https://wordpress.org/plugins/debug-bar/) plugin
to be installed and activated.

Also note that this plugin should be used solely for debugging and/or in a development
environment and is not intended for use on a production site.

If you like this plugin, please [rate and/or review](https://wordpress.org/support/view/plugin-reviews/debug-bar-localization)
it. If you have ideas on how to make the plugin even better or if you have found
any bugs, please report these in the [Support Forum](https://wordpress.org/support/plugin/debug-bar-localization)
or in the [GitHub repository](https://github.com/jrfnl/debug-bar-localization/issues).

## 屏幕截图

 * [[
 * Debug Bar Localization displaying basic statistics.
 * [[
 * Debug Bar Localization displaying textdomains without a ‘load call’.
 * [[
 * Debug Bar Localization displaying the load textdomain calls made.

## 安装

 1. Install Debug Bar if not already installed (https://wordpress.org/plugins/debug-
    bar/).
 2. Extract the .zip file for this plugin and upload its contents to the `/wp-content/
    plugins/` directory. Alternatively, you can install directly from the Plugin directory
    within your WordPress Install.
 3. Activate the plugin through the “Plugins” menu in WordPress.

Don’t use this plugin on a live site. This plugin is **only** intended to be used
for development purposes.

## 常见问题

  Can it be used on live site ?

This plugin is only meant to be used for development purposes, but shouldn’t cause
any issues if run on a production site.

  What is internationalization ?

> Internationalization is the process of developing your plugin/theme so that it
> can easily be translated into other languages.

Ref: [Plugin Handbook](https://developer.wordpress.org/plugins/internationalization/)/
[Theme Handbook](https://developer.wordpress.org/themes/functionality/internationalization/)

  What is localization ?

> Localization describes the subsequent process of translating an internationalized
> plugin/theme.

Ref: [Plugin Handbook](https://developer.wordpress.org/plugins/internationalization/localization/)/
[Theme Handbook](https://developer.wordpress.org/themes/functionality/localization/)

  How do I internationalize my theme/plugin ?

For plugins, see the [Plugin Handbook on Internationalization](https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/).

For themes, see the [Theme Handbook on Internationalization](https://developer.wordpress.org/themes/functionality/internationalization/).

  How do I localize my theme / plugin ?

For plugins, see the [Plugin Handbook on Localization](https://developer.wordpress.org/plugins/internationalization/localization/).

For themes, see the [Theme Handbook on Localization](https://developer.wordpress.org/themes/functionality/localization/).

  Why is my `load_…_textdomain()` call not listed ?

There are several potential reasons for this:

 1. You might not be loading the translations correctly. See the above referenced handbook
    pages for more information.
 2. You might be loading your translations selectively (lean loading), only on the 
    pages they are needed. If so, make sure you are viewing such a page to see your
    translation listed.
 3. You might be loading your translations too early or too late. Translations are 
    best loaded on the `(admin_)init` hook. For more information see [this article](http://geertdedeckere.be/article/loading-wordpress-language-files-the-right-way).

In particular take note of the following:
 If your textdomain is loaded before this
plugin is loaded, _i.e. if you load your textdomain on the PHP file load from a 
must-use plugin_, _or_ if your textdomain is loaded very late, _i.e. after the admin
bar has loaded_, this plugin can not pick up on the `load_..._textdomain()` call.

  Why won’t the plugin activate ?

Have you read what it says in the beautifully red bar at the top of your plugins
page ? As it says there, the Debug Bar plugin needs to be active for this plugin
to work. If the Debug Bar plugin is not active, this plugin will automatically de-
activate itself.

## 评价

![](https://secure.gravatar.com/avatar/07a20c9f56b2b62f304e1e3820aec06f9bf96bd4fd2533749b0e738042fb6e6c?
s=60&d=retro&r=g)

### 󠀁[Works like a charm](https://wordpress.org/support/topic/works-like-a-charm-1469/)󠁿

 [Karolina Vyskocilova](https://profiles.wordpress.org/vyskoczilova/) 2019 年 5 
月 24 日 1 回复

When you’ve messed up your localize_script or plugin and you have a hard time tracking
it, it helps you in no time! Great job!

![](https://secure.gravatar.com/avatar/56426725c280afc84d2da3e357d6b9c9c4df6e98e287f99e1a2425430a020f9d?
s=60&d=retro&r=g)

### 󠀁[Very nice](https://wordpress.org/support/topic/very-nice-695/)󠁿

 [X-Raym](https://profiles.wordpress.org/x-raym/) 2016 年 9 月 3 日 1 回复

Just help me to debug a website that had a problem !! Thanks !!! 🙂

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/)

## 贡献者及开发者

「Debug Bar Localization」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Juliette Reinders Folmer ](https://profiles.wordpress.org/jrf/)

「Debug Bar Localization」插件已被翻译至 4 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/debug-bar-localization/contributors)
为本插件所做的贡献。

[帮助将「Debug Bar Localization」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/debug-bar-localization)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/debug-bar-localization/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/debug-bar-localization/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/debug-bar-localization/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/debug-bar-localization/)。

## 更新日志

#### 1.1 (2016-04-29 )

 * [Enhancement] Don’t show warning about duplicate load calls on plugins page as
   that’s caused by core, not by a plugin and the warning could be misleading.
 * [Enhancement] Make loading of ‘our own’ text-domain compatible with use of this
   plugin in the `must-use` plugins directory.
 * [Enhancement] Improve categorization of the loaded text-domains. This mainly 
   applies to text-domains for which the mo_file paths are being filtered.
 * [Enhancement] Added a section showing potentially unnecessary/inefficient `load_textdomain`
   calls.
 * [Bugfix] The plugin loading order functions were inadvertently checking the wrong
   value and – in single site – install, adding an invalid value to the active plugins
   list causing incorrect ‘plugin deactivated as file not found’ notices.
 * [Compatibility] Fix WP 4.5 compatibility – the check whether a text-domain `load`
   call was made (ab)used a bug in the `is_textdomain_loaded()` function. [This bug](https://core.trac.wordpress.org/ticket/21319)
   was fixed in WP 4.5. Fixed by creating a work-around to still be able to provide
   this information.
 * [Compatibility] Prevent PHP error notices in WP < 4.0.
 * General housekeeping

#### 1.0 (2016-01-13)

 * Initial release.

## 额外信息

 *  版本 **1.1**
 *  最后更新：**10 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.5.33**
 *  语言
 * [Dutch](https://nl.wordpress.org/plugins/debug-bar-localization/) 、 [English (Canada)](https://en-ca.wordpress.org/plugins/debug-bar-localization/)、
   [English (US)](https://wordpress.org/plugins/debug-bar-localization/) 、 [Portuguese (Portugal)](https://pt.wordpress.org/plugins/debug-bar-localization/)
   和 [Swedish](https://sv.wordpress.org/plugins/debug-bar-localization/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/debug-bar-localization)
 * 标签
 * [debug bar](https://cn.wordpress.org/plugins/tags/debug-bar/)[debugbar](https://cn.wordpress.org/plugins/tags/debugbar/)
   [language](https://cn.wordpress.org/plugins/tags/language/)[localization](https://cn.wordpress.org/plugins/tags/localization/)
 *  [高级视图](https://cn.wordpress.org/plugins/debug-bar-localization/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/debug-bar-localization/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/debug-bar-localization/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/debug-bar-localization/reviews/)

## 贡献者

 *   [ Juliette Reinders Folmer ](https://profiles.wordpress.org/jrf/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/debug-bar-localization/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=995SSNDTCVBJG)