Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserCountry/functions.php')
-rw-r--r--plugins/UserCountry/functions.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/UserCountry/functions.php b/plugins/UserCountry/functions.php
index 008e4786a5..afab257068 100644
--- a/plugins/UserCountry/functions.php
+++ b/plugins/UserCountry/functions.php
@@ -22,6 +22,10 @@ use Piwik\Tracker\Visit;
*/
function getFlagFromCode($code)
{
+ if (strtolower($code) == 'ti') {
+ $code = 'cn';
+ }
+
$pathInPiwik = 'plugins/Morpheus/icons/dist/flags/%s.png';
$pathWithCode = sprintf($pathInPiwik, $code);
$absolutePath = PIWIK_INCLUDE_PATH . '/' . $pathWithCode;
@@ -57,6 +61,10 @@ function countryTranslate($label)
return Piwik::translate('General_Unknown');
}
+ if (strtolower($label) == 'ti') {
+ $label = 'cn';
+ }
+
// Try to get name from Intl plugin
$key = 'Intl_Country_' . strtoupper($label);
$country = Piwik::translate($key);