26 public function get($locale)
30 if (!isset(static::$bundles[
$class][$locale])) {
32 if (!$bundle && $this->path !=
'ICUDATA') {
35 static::$bundles[
$class][$locale] = $bundle;
37 return static::$bundles[
$class][$locale];
48 $bundle = new \ResourceBundle($locale,
$path);
49 }
catch (\Exception $e) {
64 $localeParts = \Locale::parseLocale($locale);
65 $cleanLocaleParts = [];
66 if (isset($localeParts[
'language'])) {
67 $cleanLocaleParts[
'language'] = $localeParts[
'language'];
69 if (isset($localeParts[
'script'])) {
70 $cleanLocaleParts[
'script'] = $localeParts[
'script'];
72 return \Locale::composeLocale($cleanLocaleParts);
$_option $_optionId $class
createResourceBundle($locale, $path)