|
@@ -41,7 +41,7 @@ class Locale extends \Locale
|
|
|
static public function getDisplayCountries($locale)
|
|
|
{
|
|
|
if (!isset(self::$countries[$locale])) {
|
|
|
- $bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/region');
|
|
|
+ $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/region');
|
|
|
|
|
|
if (null === $bundle) {
|
|
|
throw new \RuntimeException('The country resource bundle could not be loaded');
|
|
@@ -88,7 +88,7 @@ class Locale extends \Locale
|
|
|
static public function getDisplayLanguages($locale)
|
|
|
{
|
|
|
if (!isset(self::$languages[$locale])) {
|
|
|
- $bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/lang');
|
|
|
+ $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/lang');
|
|
|
|
|
|
if (null === $bundle) {
|
|
|
throw new \RuntimeException('The language resource bundle could not be loaded');
|
|
@@ -133,7 +133,7 @@ class Locale extends \Locale
|
|
|
static public function getDisplayLocales($locale)
|
|
|
{
|
|
|
if (!isset(self::$locales[$locale])) {
|
|
|
- $bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/names');
|
|
|
+ $bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/names');
|
|
|
|
|
|
if (null === $bundle) {
|
|
|
throw new \RuntimeException('The locale resource bundle could not be loaded');
|