@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (preg_match("/^(?P<lang>[a-z]{2,3})" // language code |
| 61 | 61 | ."(?:_(?P<country>[A-Z]{2}))?" // country code |
| 62 | 62 | ."(?:\.(?P<charset>[-A-Za-z0-9_]+))?" // charset |
| 63 | - ."(?:@(?P<modifier>[-A-Za-z0-9_]+))?$/", // @ modifier |
|
| 63 | + ."(?:@(?P<modifier>[-A-Za-z0-9_]+))?$/", // @ modifier |
|
| 64 | 64 | $locale, $matches)) { |
| 65 | 65 | |
| 66 | 66 | extract($matches); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $locale_names; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - public function get_translator($domain='') |
|
| 97 | + public function get_translator($domain = '') |
|
| 98 | 98 | { |
| 99 | 99 | if (empty($domain)) { |
| 100 | 100 | $domain = $this->default_domain; |
@@ -71,8 +71,9 @@ |
||
| 71 | 71 | array_push($locale_names, "${lang}_$country.$charset@$modifier"); |
| 72 | 72 | } |
| 73 | 73 | array_push($locale_names, "${lang}_$country@$modifier"); |
| 74 | - } elseif ($charset) |
|
| 75 | - array_push($locale_names, "${lang}.$charset@$modifier"); |
|
| 74 | + } elseif ($charset) { |
|
| 75 | + array_push($locale_names, "${lang}.$charset@$modifier"); |
|
| 76 | + } |
|
| 76 | 77 | array_push($locale_names, "$lang@$modifier"); |
| 77 | 78 | } |
| 78 | 79 | if ($country) { |