Title: Region Detect
Author: joebrewer
Published: <strong>2011 年 5 月 26 日</strong>
Last modified: 2013 年 10 月 17 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/regiondetect.svg)

# Region Detect

 作者：[joebrewer](https://profiles.wordpress.org/joebrewer/)

[下载](https://downloads.wordpress.org/plugin/regiondetect.1.02.05.zip)

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

 [支持](https://wordpress.org/support/plugin/regiondetect/)

## 描述

Region detect is a plugin for WordPress that detects the country that the current
visitor is browsing from.

It can display the country to the user; something like: Hello visitor from Spain!
or display a flag of the country. The plugin also makes the ISO 3166-1 country code
and country name avaliable to other plugins.

## 安装

 1. Extract the zip file and just drop the contents in the `wp-content/plugins/` directory
    of your WordPress installation.
 2. Activate the plugin through the ‘Plugins’ page.
 3. Copy the MaxMind country database to the plugin folder, or add your MaxMind license
    key to the plugin admin panel.
 4. If you are using the web service enable caching and select the cache length that
    you need.
 5. Use %%COUNTRYCODE%% or %%COUNTRYNAME%% in your posts to display the two character
    country code or country name respectively.

## 常见问题

  Do I have to pay for the MaxMind database?

No, MaxMind offer a free version of the database. However the paid for version is
more accurate.

  I am a wordpress developer and want to access the country code or name in my code.
How do I do that?

Easy 🙂 Just declare the global variables $rdISO3166_1 or $rdCountryName in your
code and away you go.

## 评价

此插件暂无评价。

## 贡献者及开发者

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

贡献者

 *   [ joebrewer ](https://profiles.wordpress.org/joebrewer/)

[帮助将「Region Detect」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/regiondetect)

### 对开发感兴趣吗?

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

## 更新日志

#### 1.00.00

 * Initial version

#### 1.01.00

 * Added option to set the country from the url

#### 1.02.00

 * Corrected bug with the cache clearing too quickly
 * Added a table that shows countries and number of ip addresses that are cached

#### 1.02.01

 * Corrected spelling mistakes

#### 1.02.02

 * Removed debugging code

#### 1.02.04

 * Fixed installation bug which was causing a crash when installing

#### 1.02.05

 * Made plugin multisite compliant

## 额外信息

 *  版本 **1.02.05**
 *  最后更新：**13 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.1.2 或更高版本 **
 *  已测试的最高版本为 **3.6.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/regiondetect/)
 * 标签
 * [country detection](https://cn.wordpress.org/plugins/tags/country-detection/)
   [geolocation](https://cn.wordpress.org/plugins/tags/geolocation/)[localisation](https://cn.wordpress.org/plugins/tags/localisation/)
   [localization](https://cn.wordpress.org/plugins/tags/localization/)
 *  [高级视图](https://cn.wordpress.org/plugins/regiondetect/advanced/)

## 评级

尚未提交反馈。

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

[查看全部评论](https://wordpress.org/support/plugin/regiondetect/reviews/)

## 贡献者

 *   [ joebrewer ](https://profiles.wordpress.org/joebrewer/)

## 支持

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

 [查看支持论坛](https://wordpress.org/support/plugin/regiondetect/)

## 捐助

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

 [ 捐助此插件 ](http://www.brewsterware.com/region-detect-wordpress-plugin.html)