@@ -11,31 +11,31 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleTk extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function endonym() |
|
| 15 | - { |
|
| 16 | - return 'türkmen dili'; |
|
| 17 | - } |
|
| 14 | + public function endonym() |
|
| 15 | + { |
|
| 16 | + return 'türkmen dili'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonymSortable() |
|
| 20 | - { |
|
| 21 | - return 'TURKMEN DILI'; |
|
| 22 | - } |
|
| 19 | + public function endonymSortable() |
|
| 20 | + { |
|
| 21 | + return 'TURKMEN DILI'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function language() |
|
| 25 | - { |
|
| 26 | - return new LanguageTk(); |
|
| 27 | - } |
|
| 24 | + public function language() |
|
| 25 | + { |
|
| 26 | + return new LanguageTk(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function numberSymbols() |
|
| 30 | - { |
|
| 31 | - return array( |
|
| 32 | - self::GROUP => self::NBSP, |
|
| 33 | - self::DECIMAL => self::COMMA, |
|
| 34 | - ); |
|
| 35 | - } |
|
| 29 | + public function numberSymbols() |
|
| 30 | + { |
|
| 31 | + return array( |
|
| 32 | + self::GROUP => self::NBSP, |
|
| 33 | + self::DECIMAL => self::COMMA, |
|
| 34 | + ); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - protected function percentFormat() |
|
| 38 | - { |
|
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | - } |
|
| 37 | + protected function percentFormat() |
|
| 38 | + { |
|
| 39 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | protected function percentFormat() |
| 38 | 38 | { |
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 39 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -11,22 +11,22 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleUzArab extends LocaleUz |
| 13 | 13 | { |
| 14 | - public function script() |
|
| 15 | - { |
|
| 16 | - return new ScriptArab(); |
|
| 17 | - } |
|
| 14 | + public function script() |
|
| 15 | + { |
|
| 16 | + return new ScriptArab(); |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function numberSymbols() |
|
| 20 | - { |
|
| 21 | - return array( |
|
| 22 | - self::GROUP => self::ARAB_GROUP, |
|
| 23 | - self::DECIMAL => self::ARAB_DECIMAL, |
|
| 24 | - self::NEGATIVE => self::HYPHEN, |
|
| 25 | - ); |
|
| 26 | - } |
|
| 19 | + public function numberSymbols() |
|
| 20 | + { |
|
| 21 | + return array( |
|
| 22 | + self::GROUP => self::ARAB_GROUP, |
|
| 23 | + self::DECIMAL => self::ARAB_DECIMAL, |
|
| 24 | + self::NEGATIVE => self::HYPHEN, |
|
| 25 | + ); |
|
| 26 | + } |
|
| 27 | 27 | |
| 28 | - protected function percentFormat() |
|
| 29 | - { |
|
| 30 | - return self::PLACEHOLDER . self::ARAB_PERCENT; |
|
| 31 | - } |
|
| 28 | + protected function percentFormat() |
|
| 29 | + { |
|
| 30 | + return self::PLACEHOLDER . self::ARAB_PERCENT; |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | |
| 28 | 28 | protected function percentFormat() |
| 29 | 29 | { |
| 30 | - return self::PLACEHOLDER . self::ARAB_PERCENT; |
|
| 30 | + return self::PLACEHOLDER.self::ARAB_PERCENT; |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -11,31 +11,31 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleGl extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function endonym() |
|
| 15 | - { |
|
| 16 | - return 'galego'; |
|
| 17 | - } |
|
| 14 | + public function endonym() |
|
| 15 | + { |
|
| 16 | + return 'galego'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonymSortable() |
|
| 20 | - { |
|
| 21 | - return 'GALEGO'; |
|
| 22 | - } |
|
| 19 | + public function endonymSortable() |
|
| 20 | + { |
|
| 21 | + return 'GALEGO'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function language() |
|
| 25 | - { |
|
| 26 | - return new LanguageGl(); |
|
| 27 | - } |
|
| 24 | + public function language() |
|
| 25 | + { |
|
| 26 | + return new LanguageGl(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function numberSymbols() |
|
| 30 | - { |
|
| 31 | - return array( |
|
| 32 | - self::GROUP => self::DOT, |
|
| 33 | - self::DECIMAL => self::COMMA, |
|
| 34 | - ); |
|
| 35 | - } |
|
| 29 | + public function numberSymbols() |
|
| 30 | + { |
|
| 31 | + return array( |
|
| 32 | + self::GROUP => self::DOT, |
|
| 33 | + self::DECIMAL => self::COMMA, |
|
| 34 | + ); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - public function percentFormat() |
|
| 38 | - { |
|
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | - } |
|
| 37 | + public function percentFormat() |
|
| 38 | + { |
|
| 39 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function percentFormat() |
| 38 | 38 | { |
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 39 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -15,298 +15,298 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | abstract class AbstractLocale |
| 17 | 17 | { |
| 18 | - // "Source" strings, when translating numbers |
|
| 19 | - const DECIMAL = '.'; // The default decimal mark |
|
| 20 | - const GROUP = ','; // The digit group separator |
|
| 21 | - const NEGATIVE = '-'; // Negative numbers |
|
| 18 | + // "Source" strings, when translating numbers |
|
| 19 | + const DECIMAL = '.'; // The default decimal mark |
|
| 20 | + const GROUP = ','; // The digit group separator |
|
| 21 | + const NEGATIVE = '-'; // Negative numbers |
|
| 22 | 22 | |
| 23 | - // "Target" strings, when translating numbers |
|
| 24 | - const ALM = "\xD8\x9C"; // Arabic Letter Mark |
|
| 25 | - const APOSTROPHE = '’'; |
|
| 26 | - const ARAB_DECIMAL = "\xD9\xAB"; |
|
| 27 | - const ARAB_GROUP = "\xD9\xAC"; |
|
| 28 | - const ARAB_MINUS = "\xE2\x88\x92"; |
|
| 29 | - const ARAB_PERCENT = "\xD9\xAA"; |
|
| 30 | - const COMMA = ','; |
|
| 31 | - const DOT = '.'; |
|
| 32 | - const HYPHEN = '-'; |
|
| 33 | - const LTR_MARK = "\xE2\x80\x8E"; // Left-to-right marker |
|
| 34 | - const MINUS_SIGN = "\xE2\x88\x92"; |
|
| 35 | - const NBSP = "\xC2\xA0"; // A non-breaking space |
|
| 36 | - const PRIME = '\''; |
|
| 37 | - const RTL_MARK = "\xE2\x80\x8F"; // Right-to-left marker |
|
| 23 | + // "Target" strings, when translating numbers |
|
| 24 | + const ALM = "\xD8\x9C"; // Arabic Letter Mark |
|
| 25 | + const APOSTROPHE = '’'; |
|
| 26 | + const ARAB_DECIMAL = "\xD9\xAB"; |
|
| 27 | + const ARAB_GROUP = "\xD9\xAC"; |
|
| 28 | + const ARAB_MINUS = "\xE2\x88\x92"; |
|
| 29 | + const ARAB_PERCENT = "\xD9\xAA"; |
|
| 30 | + const COMMA = ','; |
|
| 31 | + const DOT = '.'; |
|
| 32 | + const HYPHEN = '-'; |
|
| 33 | + const LTR_MARK = "\xE2\x80\x8E"; // Left-to-right marker |
|
| 34 | + const MINUS_SIGN = "\xE2\x88\x92"; |
|
| 35 | + const NBSP = "\xC2\xA0"; // A non-breaking space |
|
| 36 | + const PRIME = '\''; |
|
| 37 | + const RTL_MARK = "\xE2\x80\x8F"; // Right-to-left marker |
|
| 38 | 38 | |
| 39 | - // For formatting percentages |
|
| 40 | - const PERCENT = '%%'; |
|
| 41 | - const PLACEHOLDER = '%s'; |
|
| 39 | + // For formatting percentages |
|
| 40 | + const PERCENT = '%%'; |
|
| 41 | + const PLACEHOLDER = '%s'; |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Generate a linux locale code for this locale. Examples include |
|
| 45 | - * "fr", “en_GB”, “ca_ES@valencia” and “sr@latin”. |
|
| 46 | - * |
|
| 47 | - * @return string |
|
| 48 | - */ |
|
| 49 | - public function code() |
|
| 50 | - { |
|
| 51 | - $code = $this->language()->code() . '_' . $this->territory()->code(); |
|
| 43 | + /** |
|
| 44 | + * Generate a linux locale code for this locale. Examples include |
|
| 45 | + * "fr", “en_GB”, “ca_ES@valencia” and “sr@latin”. |
|
| 46 | + * |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 49 | + public function code() |
|
| 50 | + { |
|
| 51 | + $code = $this->language()->code() . '_' . $this->territory()->code(); |
|
| 52 | 52 | |
| 53 | - if ($this->script() != $this->language()->defaultScript()) { |
|
| 54 | - $code .= '@' . strtolower($this->script()->unicodeName()); |
|
| 55 | - } |
|
| 53 | + if ($this->script() != $this->language()->defaultScript()) { |
|
| 54 | + $code .= '@' . strtolower($this->script()->unicodeName()); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - if ($this->variant()) { |
|
| 58 | - if ($this->variant()->code() === 'posix') { |
|
| 59 | - $code = 'POSIX'; |
|
| 60 | - } else { |
|
| 61 | - $code .= '@' . $this->variant()->code(); |
|
| 62 | - } |
|
| 63 | - } |
|
| 57 | + if ($this->variant()) { |
|
| 58 | + if ($this->variant()->code() === 'posix') { |
|
| 59 | + $code = 'POSIX'; |
|
| 60 | + } else { |
|
| 61 | + $code .= '@' . $this->variant()->code(); |
|
| 62 | + } |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - return $code; |
|
| 66 | - } |
|
| 65 | + return $code; |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - /** |
|
| 69 | - * Which collation sequence should be used for this locale? |
|
| 70 | - * “unicode_ci” would mean use “utf8_unicode_ci”, “utf8mb4_unicode_ci”, etc. |
|
| 71 | - * |
|
| 72 | - * @link http://dev.mysql.com/doc/refman/5.7/en/charset-unicode-sets.html |
|
| 73 | - * @return string |
|
| 74 | - */ |
|
| 75 | - public function collation() |
|
| 76 | - { |
|
| 77 | - return 'unicode_ci'; |
|
| 78 | - } |
|
| 68 | + /** |
|
| 69 | + * Which collation sequence should be used for this locale? |
|
| 70 | + * “unicode_ci” would mean use “utf8_unicode_ci”, “utf8mb4_unicode_ci”, etc. |
|
| 71 | + * |
|
| 72 | + * @link http://dev.mysql.com/doc/refman/5.7/en/charset-unicode-sets.html |
|
| 73 | + * @return string |
|
| 74 | + */ |
|
| 75 | + public function collation() |
|
| 76 | + { |
|
| 77 | + return 'unicode_ci'; |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Convert (Hindu-Arabic) digits into a localized form |
|
| 82 | - * |
|
| 83 | - * @param string $string e.g. "123.45" |
|
| 84 | - * |
|
| 85 | - * @return string |
|
| 86 | - */ |
|
| 87 | - public function digits($string) |
|
| 88 | - { |
|
| 89 | - return strtr($string, $this->numberSymbols() + $this->numerals()); |
|
| 90 | - } |
|
| 80 | + /** |
|
| 81 | + * Convert (Hindu-Arabic) digits into a localized form |
|
| 82 | + * |
|
| 83 | + * @param string $string e.g. "123.45" |
|
| 84 | + * |
|
| 85 | + * @return string |
|
| 86 | + */ |
|
| 87 | + public function digits($string) |
|
| 88 | + { |
|
| 89 | + return strtr($string, $this->numberSymbols() + $this->numerals()); |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - /** |
|
| 93 | - * When writing large numbers place a separator after this number of digits. |
|
| 94 | - * |
|
| 95 | - * @return int |
|
| 96 | - */ |
|
| 97 | - protected function digitsFirstGroup() |
|
| 98 | - { |
|
| 99 | - return 3; |
|
| 100 | - } |
|
| 92 | + /** |
|
| 93 | + * When writing large numbers place a separator after this number of digits. |
|
| 94 | + * |
|
| 95 | + * @return int |
|
| 96 | + */ |
|
| 97 | + protected function digitsFirstGroup() |
|
| 98 | + { |
|
| 99 | + return 3; |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * When writing large numbers place a separator after this number of digits. |
|
| 104 | - * |
|
| 105 | - * @return int |
|
| 106 | - */ |
|
| 107 | - protected function digitsGroup() |
|
| 108 | - { |
|
| 109 | - return 3; |
|
| 110 | - } |
|
| 102 | + /** |
|
| 103 | + * When writing large numbers place a separator after this number of digits. |
|
| 104 | + * |
|
| 105 | + * @return int |
|
| 106 | + */ |
|
| 107 | + protected function digitsGroup() |
|
| 108 | + { |
|
| 109 | + return 3; |
|
| 110 | + } |
|
| 111 | 111 | |
| 112 | - /** |
|
| 113 | - * Is text written left-to-right “ltr” or right-to-left “rtl”. |
|
| 114 | - * Most scripts are only written in one direction, but there are a few that |
|
| 115 | - * can be written in either direction. |
|
| 116 | - * |
|
| 117 | - * @return string “ltr” or “rtl” |
|
| 118 | - */ |
|
| 119 | - public function direction() |
|
| 120 | - { |
|
| 121 | - return $this->script()->direction(); |
|
| 122 | - } |
|
| 112 | + /** |
|
| 113 | + * Is text written left-to-right “ltr” or right-to-left “rtl”. |
|
| 114 | + * Most scripts are only written in one direction, but there are a few that |
|
| 115 | + * can be written in either direction. |
|
| 116 | + * |
|
| 117 | + * @return string “ltr” or “rtl” |
|
| 118 | + */ |
|
| 119 | + public function direction() |
|
| 120 | + { |
|
| 121 | + return $this->script()->direction(); |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * A locale must define an endonym. |
|
| 126 | - * |
|
| 127 | - * @return string |
|
| 128 | - */ |
|
| 129 | - abstract public function endonym(); |
|
| 124 | + /** |
|
| 125 | + * A locale must define an endonym. |
|
| 126 | + * |
|
| 127 | + * @return string |
|
| 128 | + */ |
|
| 129 | + abstract public function endonym(); |
|
| 130 | 130 | |
| 131 | - /** |
|
| 132 | - * A sortable version of the locale name. For example, “British English” |
|
| 133 | - * might sort as “ENGLISH, BRITISH” to keep all the variants of English together. |
|
| 134 | - * All-capitals makes sorting easier, as we can use a simple strcmp(). |
|
| 135 | - * |
|
| 136 | - * @return string |
|
| 137 | - */ |
|
| 138 | - public function endonymSortable() |
|
| 139 | - { |
|
| 140 | - return $this->endonym(); |
|
| 141 | - } |
|
| 131 | + /** |
|
| 132 | + * A sortable version of the locale name. For example, “British English” |
|
| 133 | + * might sort as “ENGLISH, BRITISH” to keep all the variants of English together. |
|
| 134 | + * All-capitals makes sorting easier, as we can use a simple strcmp(). |
|
| 135 | + * |
|
| 136 | + * @return string |
|
| 137 | + */ |
|
| 138 | + public function endonymSortable() |
|
| 139 | + { |
|
| 140 | + return $this->endonym(); |
|
| 141 | + } |
|
| 142 | 142 | |
| 143 | - /** |
|
| 144 | - * Markup for an HTML element |
|
| 145 | - * |
|
| 146 | - * @return string e.g. lang="ar" dir="rtl" |
|
| 147 | - */ |
|
| 148 | - public function htmlAttributes() |
|
| 149 | - { |
|
| 150 | - if ($this->direction() === 'rtl' || $this->direction() !== $this->script()->direction()) { |
|
| 151 | - return 'lang="' . $this->languageTag() . '" dir="' . $this->direction() . '"'; |
|
| 152 | - } else { |
|
| 153 | - return 'lang="' . $this->languageTag() . '"'; |
|
| 154 | - } |
|
| 155 | - } |
|
| 143 | + /** |
|
| 144 | + * Markup for an HTML element |
|
| 145 | + * |
|
| 146 | + * @return string e.g. lang="ar" dir="rtl" |
|
| 147 | + */ |
|
| 148 | + public function htmlAttributes() |
|
| 149 | + { |
|
| 150 | + if ($this->direction() === 'rtl' || $this->direction() !== $this->script()->direction()) { |
|
| 151 | + return 'lang="' . $this->languageTag() . '" dir="' . $this->direction() . '"'; |
|
| 152 | + } else { |
|
| 153 | + return 'lang="' . $this->languageTag() . '"'; |
|
| 154 | + } |
|
| 155 | + } |
|
| 156 | 156 | |
| 157 | - /** |
|
| 158 | - * A locale must define a language. |
|
| 159 | - * |
|
| 160 | - * @return LanguageInterface |
|
| 161 | - */ |
|
| 162 | - abstract public function language(); |
|
| 157 | + /** |
|
| 158 | + * A locale must define a language. |
|
| 159 | + * |
|
| 160 | + * @return LanguageInterface |
|
| 161 | + */ |
|
| 162 | + abstract public function language(); |
|
| 163 | 163 | |
| 164 | - /** |
|
| 165 | - * The IETF language tag for the locale. Examples include |
|
| 166 | - * “fr, “en-GB”, “ca-ES-valencia” and “sr-Latn”. |
|
| 167 | - * |
|
| 168 | - * @return string |
|
| 169 | - */ |
|
| 170 | - public function languageTag() |
|
| 171 | - { |
|
| 172 | - $language_tag = $this->language()->code(); |
|
| 173 | - if ($this->script() != $this->language()->defaultScript()) { |
|
| 174 | - $language_tag .= '-' . $this->script()->code(); |
|
| 175 | - } |
|
| 176 | - if ($this->territory() != $this->language()->defaultTerritory()) { |
|
| 177 | - $language_tag .= '-' . $this->territory()->code(); |
|
| 178 | - } |
|
| 179 | - if ($this->variant()) { |
|
| 180 | - $language_tag .= '-' . $this->variant()->code(); |
|
| 181 | - } |
|
| 164 | + /** |
|
| 165 | + * The IETF language tag for the locale. Examples include |
|
| 166 | + * “fr, “en-GB”, “ca-ES-valencia” and “sr-Latn”. |
|
| 167 | + * |
|
| 168 | + * @return string |
|
| 169 | + */ |
|
| 170 | + public function languageTag() |
|
| 171 | + { |
|
| 172 | + $language_tag = $this->language()->code(); |
|
| 173 | + if ($this->script() != $this->language()->defaultScript()) { |
|
| 174 | + $language_tag .= '-' . $this->script()->code(); |
|
| 175 | + } |
|
| 176 | + if ($this->territory() != $this->language()->defaultTerritory()) { |
|
| 177 | + $language_tag .= '-' . $this->territory()->code(); |
|
| 178 | + } |
|
| 179 | + if ($this->variant()) { |
|
| 180 | + $language_tag .= '-' . $this->variant()->code(); |
|
| 181 | + } |
|
| 182 | 182 | |
| 183 | - return $language_tag; |
|
| 184 | - } |
|
| 183 | + return $language_tag; |
|
| 184 | + } |
|
| 185 | 185 | |
| 186 | - /** |
|
| 187 | - * When using grouping digits in numbers, keep this many of digits together. |
|
| 188 | - * |
|
| 189 | - * @return int |
|
| 190 | - */ |
|
| 191 | - protected function minimumGroupingDigits() |
|
| 192 | - { |
|
| 193 | - return 1; |
|
| 194 | - } |
|
| 186 | + /** |
|
| 187 | + * When using grouping digits in numbers, keep this many of digits together. |
|
| 188 | + * |
|
| 189 | + * @return int |
|
| 190 | + */ |
|
| 191 | + protected function minimumGroupingDigits() |
|
| 192 | + { |
|
| 193 | + return 1; |
|
| 194 | + } |
|
| 195 | 195 | |
| 196 | - /** |
|
| 197 | - * Convert (Hindu-Arabic) digits into a localized form |
|
| 198 | - * |
|
| 199 | - * @param string|float|int $number The number to be localized |
|
| 200 | - * |
|
| 201 | - * @return string |
|
| 202 | - */ |
|
| 203 | - public function number($number) |
|
| 204 | - { |
|
| 205 | - if ($number < 0) { |
|
| 206 | - $number = -$number; |
|
| 207 | - $negative = self::NEGATIVE; |
|
| 208 | - } else { |
|
| 209 | - $negative = ''; |
|
| 210 | - } |
|
| 211 | - $parts = explode(self::DECIMAL, $number, 2); |
|
| 212 | - $integers = $parts[0]; |
|
| 213 | - if (strlen($integers) >= $this->digitsFirstGroup() + $this->minimumGroupingDigits()) { |
|
| 214 | - $todo = substr($integers, 0, -$this->digitsFirstGroup()); |
|
| 215 | - $integers = self::GROUP . substr($integers, -$this->digitsFirstGroup()); |
|
| 216 | - while (strlen($todo) >= $this->digitsGroup() + $this->minimumGroupingDigits()) { |
|
| 217 | - $integers = self::GROUP . substr($todo, -$this->digitsGroup()) . $integers; |
|
| 218 | - $todo = substr($todo, 0, -$this->digitsGroup()); |
|
| 219 | - } |
|
| 220 | - $integers = $todo . $integers; |
|
| 221 | - } |
|
| 222 | - if (count($parts) > 1) { |
|
| 223 | - $decimals = self::DECIMAL . $parts[1]; |
|
| 224 | - } else { |
|
| 225 | - $decimals = ''; |
|
| 226 | - } |
|
| 196 | + /** |
|
| 197 | + * Convert (Hindu-Arabic) digits into a localized form |
|
| 198 | + * |
|
| 199 | + * @param string|float|int $number The number to be localized |
|
| 200 | + * |
|
| 201 | + * @return string |
|
| 202 | + */ |
|
| 203 | + public function number($number) |
|
| 204 | + { |
|
| 205 | + if ($number < 0) { |
|
| 206 | + $number = -$number; |
|
| 207 | + $negative = self::NEGATIVE; |
|
| 208 | + } else { |
|
| 209 | + $negative = ''; |
|
| 210 | + } |
|
| 211 | + $parts = explode(self::DECIMAL, $number, 2); |
|
| 212 | + $integers = $parts[0]; |
|
| 213 | + if (strlen($integers) >= $this->digitsFirstGroup() + $this->minimumGroupingDigits()) { |
|
| 214 | + $todo = substr($integers, 0, -$this->digitsFirstGroup()); |
|
| 215 | + $integers = self::GROUP . substr($integers, -$this->digitsFirstGroup()); |
|
| 216 | + while (strlen($todo) >= $this->digitsGroup() + $this->minimumGroupingDigits()) { |
|
| 217 | + $integers = self::GROUP . substr($todo, -$this->digitsGroup()) . $integers; |
|
| 218 | + $todo = substr($todo, 0, -$this->digitsGroup()); |
|
| 219 | + } |
|
| 220 | + $integers = $todo . $integers; |
|
| 221 | + } |
|
| 222 | + if (count($parts) > 1) { |
|
| 223 | + $decimals = self::DECIMAL . $parts[1]; |
|
| 224 | + } else { |
|
| 225 | + $decimals = ''; |
|
| 226 | + } |
|
| 227 | 227 | |
| 228 | - return $this->digits($negative . $integers . $decimals); |
|
| 229 | - } |
|
| 228 | + return $this->digits($negative . $integers . $decimals); |
|
| 229 | + } |
|
| 230 | 230 | |
| 231 | - /** |
|
| 232 | - * The symbols used to format numbers. |
|
| 233 | - * |
|
| 234 | - * @return string[] |
|
| 235 | - */ |
|
| 236 | - protected function numberSymbols() |
|
| 237 | - { |
|
| 238 | - return array(); |
|
| 239 | - } |
|
| 231 | + /** |
|
| 232 | + * The symbols used to format numbers. |
|
| 233 | + * |
|
| 234 | + * @return string[] |
|
| 235 | + */ |
|
| 236 | + protected function numberSymbols() |
|
| 237 | + { |
|
| 238 | + return array(); |
|
| 239 | + } |
|
| 240 | 240 | |
| 241 | - /** |
|
| 242 | - * The numerals (0123456789) used by this locale. |
|
| 243 | - * |
|
| 244 | - * @return string[] |
|
| 245 | - */ |
|
| 246 | - protected function numerals() |
|
| 247 | - { |
|
| 248 | - return $this->script()->numerals(); |
|
| 249 | - } |
|
| 241 | + /** |
|
| 242 | + * The numerals (0123456789) used by this locale. |
|
| 243 | + * |
|
| 244 | + * @return string[] |
|
| 245 | + */ |
|
| 246 | + protected function numerals() |
|
| 247 | + { |
|
| 248 | + return $this->script()->numerals(); |
|
| 249 | + } |
|
| 250 | 250 | |
| 251 | - /** |
|
| 252 | - * Convert (Hindu-Arabic) digits into a localized form |
|
| 253 | - * |
|
| 254 | - * @param string|float|int $number The number to be localized |
|
| 255 | - * |
|
| 256 | - * @return string |
|
| 257 | - */ |
|
| 258 | - public function percent($number) |
|
| 259 | - { |
|
| 260 | - return sprintf($this->percentFormat(), $this->number($number * 100.0)); |
|
| 261 | - } |
|
| 251 | + /** |
|
| 252 | + * Convert (Hindu-Arabic) digits into a localized form |
|
| 253 | + * |
|
| 254 | + * @param string|float|int $number The number to be localized |
|
| 255 | + * |
|
| 256 | + * @return string |
|
| 257 | + */ |
|
| 258 | + public function percent($number) |
|
| 259 | + { |
|
| 260 | + return sprintf($this->percentFormat(), $this->number($number * 100.0)); |
|
| 261 | + } |
|
| 262 | 262 | |
| 263 | - /** |
|
| 264 | - * How to format a floating point number (%s) as a percentage. |
|
| 265 | - * |
|
| 266 | - * @return string |
|
| 267 | - */ |
|
| 268 | - protected function percentFormat() |
|
| 269 | - { |
|
| 270 | - return self::PLACEHOLDER . self::PERCENT; |
|
| 271 | - } |
|
| 263 | + /** |
|
| 264 | + * How to format a floating point number (%s) as a percentage. |
|
| 265 | + * |
|
| 266 | + * @return string |
|
| 267 | + */ |
|
| 268 | + protected function percentFormat() |
|
| 269 | + { |
|
| 270 | + return self::PLACEHOLDER . self::PERCENT; |
|
| 271 | + } |
|
| 272 | 272 | |
| 273 | - /** |
|
| 274 | - * Which plural rule is used in this locale |
|
| 275 | - * |
|
| 276 | - * @return PluralRuleInterface |
|
| 277 | - */ |
|
| 278 | - public function pluralRule() |
|
| 279 | - { |
|
| 280 | - return $this->language()->pluralRule(); |
|
| 281 | - } |
|
| 273 | + /** |
|
| 274 | + * Which plural rule is used in this locale |
|
| 275 | + * |
|
| 276 | + * @return PluralRuleInterface |
|
| 277 | + */ |
|
| 278 | + public function pluralRule() |
|
| 279 | + { |
|
| 280 | + return $this->language()->pluralRule(); |
|
| 281 | + } |
|
| 282 | 282 | |
| 283 | - /** |
|
| 284 | - * The script used by this locale. |
|
| 285 | - * |
|
| 286 | - * @return ScriptInterface |
|
| 287 | - */ |
|
| 288 | - public function script() |
|
| 289 | - { |
|
| 290 | - return $this->language()->defaultScript(); |
|
| 291 | - } |
|
| 283 | + /** |
|
| 284 | + * The script used by this locale. |
|
| 285 | + * |
|
| 286 | + * @return ScriptInterface |
|
| 287 | + */ |
|
| 288 | + public function script() |
|
| 289 | + { |
|
| 290 | + return $this->language()->defaultScript(); |
|
| 291 | + } |
|
| 292 | 292 | |
| 293 | - /** |
|
| 294 | - * The territory used by this locale. |
|
| 295 | - * |
|
| 296 | - * @return TerritoryInterface |
|
| 297 | - */ |
|
| 298 | - public function territory() |
|
| 299 | - { |
|
| 300 | - return $this->language()->defaultTerritory(); |
|
| 301 | - } |
|
| 293 | + /** |
|
| 294 | + * The territory used by this locale. |
|
| 295 | + * |
|
| 296 | + * @return TerritoryInterface |
|
| 297 | + */ |
|
| 298 | + public function territory() |
|
| 299 | + { |
|
| 300 | + return $this->language()->defaultTerritory(); |
|
| 301 | + } |
|
| 302 | 302 | |
| 303 | - /** |
|
| 304 | - * The variant, if any of this locale. |
|
| 305 | - * |
|
| 306 | - * @return VariantInterface|null |
|
| 307 | - */ |
|
| 308 | - public function variant() |
|
| 309 | - { |
|
| 310 | - return null; |
|
| 311 | - } |
|
| 303 | + /** |
|
| 304 | + * The variant, if any of this locale. |
|
| 305 | + * |
|
| 306 | + * @return VariantInterface|null |
|
| 307 | + */ |
|
| 308 | + public function variant() |
|
| 309 | + { |
|
| 310 | + return null; |
|
| 311 | + } |
|
| 312 | 312 | } |
@@ -48,17 +48,17 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function code() |
| 50 | 50 | { |
| 51 | - $code = $this->language()->code() . '_' . $this->territory()->code(); |
|
| 51 | + $code = $this->language()->code().'_'.$this->territory()->code(); |
|
| 52 | 52 | |
| 53 | 53 | if ($this->script() != $this->language()->defaultScript()) { |
| 54 | - $code .= '@' . strtolower($this->script()->unicodeName()); |
|
| 54 | + $code .= '@'.strtolower($this->script()->unicodeName()); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | if ($this->variant()) { |
| 58 | 58 | if ($this->variant()->code() === 'posix') { |
| 59 | 59 | $code = 'POSIX'; |
| 60 | 60 | } else { |
| 61 | - $code .= '@' . $this->variant()->code(); |
|
| 61 | + $code .= '@'.$this->variant()->code(); |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | public function htmlAttributes() |
| 149 | 149 | { |
| 150 | 150 | if ($this->direction() === 'rtl' || $this->direction() !== $this->script()->direction()) { |
| 151 | - return 'lang="' . $this->languageTag() . '" dir="' . $this->direction() . '"'; |
|
| 151 | + return 'lang="'.$this->languageTag().'" dir="'.$this->direction().'"'; |
|
| 152 | 152 | } else { |
| 153 | - return 'lang="' . $this->languageTag() . '"'; |
|
| 153 | + return 'lang="'.$this->languageTag().'"'; |
|
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | { |
| 172 | 172 | $language_tag = $this->language()->code(); |
| 173 | 173 | if ($this->script() != $this->language()->defaultScript()) { |
| 174 | - $language_tag .= '-' . $this->script()->code(); |
|
| 174 | + $language_tag .= '-'.$this->script()->code(); |
|
| 175 | 175 | } |
| 176 | 176 | if ($this->territory() != $this->language()->defaultTerritory()) { |
| 177 | - $language_tag .= '-' . $this->territory()->code(); |
|
| 177 | + $language_tag .= '-'.$this->territory()->code(); |
|
| 178 | 178 | } |
| 179 | 179 | if ($this->variant()) { |
| 180 | - $language_tag .= '-' . $this->variant()->code(); |
|
| 180 | + $language_tag .= '-'.$this->variant()->code(); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | return $language_tag; |
@@ -212,20 +212,20 @@ discard block |
||
| 212 | 212 | $integers = $parts[0]; |
| 213 | 213 | if (strlen($integers) >= $this->digitsFirstGroup() + $this->minimumGroupingDigits()) { |
| 214 | 214 | $todo = substr($integers, 0, -$this->digitsFirstGroup()); |
| 215 | - $integers = self::GROUP . substr($integers, -$this->digitsFirstGroup()); |
|
| 215 | + $integers = self::GROUP.substr($integers, -$this->digitsFirstGroup()); |
|
| 216 | 216 | while (strlen($todo) >= $this->digitsGroup() + $this->minimumGroupingDigits()) { |
| 217 | - $integers = self::GROUP . substr($todo, -$this->digitsGroup()) . $integers; |
|
| 217 | + $integers = self::GROUP.substr($todo, -$this->digitsGroup()).$integers; |
|
| 218 | 218 | $todo = substr($todo, 0, -$this->digitsGroup()); |
| 219 | 219 | } |
| 220 | - $integers = $todo . $integers; |
|
| 220 | + $integers = $todo.$integers; |
|
| 221 | 221 | } |
| 222 | 222 | if (count($parts) > 1) { |
| 223 | - $decimals = self::DECIMAL . $parts[1]; |
|
| 223 | + $decimals = self::DECIMAL.$parts[1]; |
|
| 224 | 224 | } else { |
| 225 | 225 | $decimals = ''; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | - return $this->digits($negative . $integers . $decimals); |
|
| 228 | + return $this->digits($negative.$integers.$decimals); |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | /** |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | */ |
| 268 | 268 | protected function percentFormat() |
| 269 | 269 | { |
| 270 | - return self::PLACEHOLDER . self::PERCENT; |
|
| 270 | + return self::PLACEHOLDER.self::PERCENT; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /** |
@@ -12,41 +12,41 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | class LocaleEs extends AbstractLocale implements LocaleInterface |
| 14 | 14 | { |
| 15 | - public function collation() |
|
| 16 | - { |
|
| 17 | - return 'spanish_ci'; |
|
| 18 | - } |
|
| 19 | - |
|
| 20 | - public function endonym() |
|
| 21 | - { |
|
| 22 | - return 'español'; |
|
| 23 | - } |
|
| 24 | - |
|
| 25 | - public function endonymSortable() |
|
| 26 | - { |
|
| 27 | - return 'ESPANOL'; |
|
| 28 | - } |
|
| 29 | - |
|
| 30 | - public function language() |
|
| 31 | - { |
|
| 32 | - return new LanguageEs(); |
|
| 33 | - } |
|
| 34 | - |
|
| 35 | - protected function percentFormat() |
|
| 36 | - { |
|
| 37 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 38 | - } |
|
| 39 | - |
|
| 40 | - public function territory() |
|
| 41 | - { |
|
| 42 | - return new TerritoryEs(); |
|
| 43 | - } |
|
| 44 | - |
|
| 45 | - public function numberSymbols() |
|
| 46 | - { |
|
| 47 | - return array( |
|
| 48 | - self::GROUP => self::DOT, |
|
| 49 | - self::DECIMAL => self::COMMA, |
|
| 50 | - ); |
|
| 51 | - } |
|
| 15 | + public function collation() |
|
| 16 | + { |
|
| 17 | + return 'spanish_ci'; |
|
| 18 | + } |
|
| 19 | + |
|
| 20 | + public function endonym() |
|
| 21 | + { |
|
| 22 | + return 'español'; |
|
| 23 | + } |
|
| 24 | + |
|
| 25 | + public function endonymSortable() |
|
| 26 | + { |
|
| 27 | + return 'ESPANOL'; |
|
| 28 | + } |
|
| 29 | + |
|
| 30 | + public function language() |
|
| 31 | + { |
|
| 32 | + return new LanguageEs(); |
|
| 33 | + } |
|
| 34 | + |
|
| 35 | + protected function percentFormat() |
|
| 36 | + { |
|
| 37 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + public function territory() |
|
| 41 | + { |
|
| 42 | + return new TerritoryEs(); |
|
| 43 | + } |
|
| 44 | + |
|
| 45 | + public function numberSymbols() |
|
| 46 | + { |
|
| 47 | + return array( |
|
| 48 | + self::GROUP => self::DOT, |
|
| 49 | + self::DECIMAL => self::COMMA, |
|
| 50 | + ); |
|
| 51 | + } |
|
| 52 | 52 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | protected function percentFormat() |
| 36 | 36 | { |
| 37 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 37 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function territory() |
@@ -11,31 +11,31 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleMo extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function endonym() |
|
| 15 | - { |
|
| 16 | - return 'limba moldovenească'; |
|
| 17 | - } |
|
| 14 | + public function endonym() |
|
| 15 | + { |
|
| 16 | + return 'limba moldovenească'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonymSortable() |
|
| 20 | - { |
|
| 21 | - return 'LIMBA MOLDOVENEASCĂ'; |
|
| 22 | - } |
|
| 19 | + public function endonymSortable() |
|
| 20 | + { |
|
| 21 | + return 'LIMBA MOLDOVENEASCĂ'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function language() |
|
| 25 | - { |
|
| 26 | - return new LanguageMo(); |
|
| 27 | - } |
|
| 24 | + public function language() |
|
| 25 | + { |
|
| 26 | + return new LanguageMo(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function numberSymbols() |
|
| 30 | - { |
|
| 31 | - return array( |
|
| 32 | - self::GROUP => self::DOT, |
|
| 33 | - self::DECIMAL => self::COMMA, |
|
| 34 | - ); |
|
| 35 | - } |
|
| 29 | + public function numberSymbols() |
|
| 30 | + { |
|
| 31 | + return array( |
|
| 32 | + self::GROUP => self::DOT, |
|
| 33 | + self::DECIMAL => self::COMMA, |
|
| 34 | + ); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - protected function percentFormat() |
|
| 38 | - { |
|
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | - } |
|
| 37 | + protected function percentFormat() |
|
| 38 | + { |
|
| 39 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | protected function percentFormat() |
| 38 | 38 | { |
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 39 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -11,31 +11,31 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleDua extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function endonym() |
|
| 15 | - { |
|
| 16 | - return 'duálá'; |
|
| 17 | - } |
|
| 14 | + public function endonym() |
|
| 15 | + { |
|
| 16 | + return 'duálá'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonymSortable() |
|
| 20 | - { |
|
| 21 | - return 'DUALA'; |
|
| 22 | - } |
|
| 19 | + public function endonymSortable() |
|
| 20 | + { |
|
| 21 | + return 'DUALA'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function language() |
|
| 25 | - { |
|
| 26 | - return new LanguageDua(); |
|
| 27 | - } |
|
| 24 | + public function language() |
|
| 25 | + { |
|
| 26 | + return new LanguageDua(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function numberSymbols() |
|
| 30 | - { |
|
| 31 | - return array( |
|
| 32 | - self::GROUP => self::NBSP, |
|
| 33 | - self::DECIMAL => self::COMMA, |
|
| 34 | - ); |
|
| 35 | - } |
|
| 29 | + public function numberSymbols() |
|
| 30 | + { |
|
| 31 | + return array( |
|
| 32 | + self::GROUP => self::NBSP, |
|
| 33 | + self::DECIMAL => self::COMMA, |
|
| 34 | + ); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - protected function percentFormat() |
|
| 38 | - { |
|
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | - } |
|
| 37 | + protected function percentFormat() |
|
| 38 | + { |
|
| 39 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | protected function percentFormat() |
| 38 | 38 | { |
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 39 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -11,31 +11,31 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleIu extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function endonym() |
|
| 15 | - { |
|
| 16 | - return 'ᐃᓄᒃᑎᑐᑦ'; |
|
| 17 | - } |
|
| 14 | + public function endonym() |
|
| 15 | + { |
|
| 16 | + return 'ᐃᓄᒃᑎᑐᑦ'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonymSortable() |
|
| 20 | - { |
|
| 21 | - return 'ᐃᓄᒃᑎᑐᑦ'; |
|
| 22 | - } |
|
| 19 | + public function endonymSortable() |
|
| 20 | + { |
|
| 21 | + return 'ᐃᓄᒃᑎᑐᑦ'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function language() |
|
| 25 | - { |
|
| 26 | - return new LanguageIu(); |
|
| 27 | - } |
|
| 24 | + public function language() |
|
| 25 | + { |
|
| 26 | + return new LanguageIu(); |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function numberSymbols() |
|
| 30 | - { |
|
| 31 | - return array( |
|
| 32 | - self::GROUP => self::NBSP, |
|
| 33 | - self::DECIMAL => self::COMMA, |
|
| 34 | - ); |
|
| 35 | - } |
|
| 29 | + public function numberSymbols() |
|
| 30 | + { |
|
| 31 | + return array( |
|
| 32 | + self::GROUP => self::NBSP, |
|
| 33 | + self::DECIMAL => self::COMMA, |
|
| 34 | + ); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - protected function percentFormat() |
|
| 38 | - { |
|
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | - } |
|
| 37 | + protected function percentFormat() |
|
| 38 | + { |
|
| 39 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | |
| 37 | 37 | protected function percentFormat() |
| 38 | 38 | { |
| 39 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 39 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -11,37 +11,37 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class LocaleSl extends AbstractLocale implements LocaleInterface |
| 13 | 13 | { |
| 14 | - public function collation() |
|
| 15 | - { |
|
| 16 | - return 'slovenian_ci'; |
|
| 17 | - } |
|
| 14 | + public function collation() |
|
| 15 | + { |
|
| 16 | + return 'slovenian_ci'; |
|
| 17 | + } |
|
| 18 | 18 | |
| 19 | - public function endonym() |
|
| 20 | - { |
|
| 21 | - return 'slovenščina'; |
|
| 22 | - } |
|
| 19 | + public function endonym() |
|
| 20 | + { |
|
| 21 | + return 'slovenščina'; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function endonymSortable() |
|
| 25 | - { |
|
| 26 | - return 'SLOVENSCINA'; |
|
| 27 | - } |
|
| 24 | + public function endonymSortable() |
|
| 25 | + { |
|
| 26 | + return 'SLOVENSCINA'; |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - public function language() |
|
| 30 | - { |
|
| 31 | - return new LanguageSl(); |
|
| 32 | - } |
|
| 29 | + public function language() |
|
| 30 | + { |
|
| 31 | + return new LanguageSl(); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - public function numberSymbols() |
|
| 35 | - { |
|
| 36 | - return array( |
|
| 37 | - self::GROUP => self::DOT, |
|
| 38 | - self::DECIMAL => self::COMMA, |
|
| 39 | - self::NEGATIVE => self::MINUS_SIGN, |
|
| 40 | - ); |
|
| 41 | - } |
|
| 34 | + public function numberSymbols() |
|
| 35 | + { |
|
| 36 | + return array( |
|
| 37 | + self::GROUP => self::DOT, |
|
| 38 | + self::DECIMAL => self::COMMA, |
|
| 39 | + self::NEGATIVE => self::MINUS_SIGN, |
|
| 40 | + ); |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - public function percentFormat() |
|
| 44 | - { |
|
| 45 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 46 | - } |
|
| 43 | + public function percentFormat() |
|
| 44 | + { |
|
| 45 | + return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -42,6 +42,6 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function percentFormat() |
| 44 | 44 | { |
| 45 | - return self::PLACEHOLDER . self::NBSP . self::PERCENT; |
|
| 45 | + return self::PLACEHOLDER.self::NBSP.self::PERCENT; |
|
| 46 | 46 | } |
| 47 | 47 | } |