Skip to content

Commit 26f873d

Browse files
committed
- set default config vars at once
1 parent 26abb75 commit 26f873d

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

I18n.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ public static function flush(): void
147147

148148
private static function registerCatalog(string $locale): I18nCatalog
149149
{
150-
return self::$catalogs[$locale] = I18nCatalog::new((new Config)
151-
->set('translation.locale', $locale)
152-
->set('translation.dir', self::$directory)
153-
->set('translation.formatter', self::$formatter)
154-
->set('translation.catalog', self::$catalog)
155-
);
150+
return self::$catalogs[$locale] = I18nCatalog::new((new Config)->import([
151+
'translation.locale' => $locale,
152+
'translation.dir' => self::$directory,
153+
'translation.formatter' => self::$formatter,
154+
'translation.catalog' => self::$catalog,
155+
]));
156156
}
157157

158158
private static function setDefaultLocale(string $locale): void

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0
1+
0.9.1

0 commit comments

Comments
 (0)