Skip to content

Commit 93e93de

Browse files
MC-19701: Country code for Taiwan (Province of China)
1 parent 32305e0 commit 93e93de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/internal/Magento/Framework/Locale/TranslatedLists.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\Locale\Bundle\DataBundle;
1111
use Magento\Framework\Locale\Bundle\LanguageBundle;
1212
use Magento\Framework\Locale\Bundle\RegionBundle;
13+
use Magento\Framework\Validator\Locale;
1314

1415
/**
1516
* Translated lists.
@@ -207,7 +208,11 @@ public function getCountryTranslation($value, $locale = null)
207208
$locale = $this->localeResolver->getLocale();
208209
}
209210

211+
$language = \Locale::getPrimaryLanguage($locale);
210212
$translation = (new RegionBundle())->get($locale)['Countries'][$value];
213+
if ($value == 'TW' && $language == 'en') {
214+
$translation .= ", Province of China";
215+
}
211216

212217
return $translation ? (string)__($translation) : $translation;
213218
}

0 commit comments

Comments
 (0)