|
@@ 2213-2219 (lines=7) @@
|
| 2210 |
|
* @param boolean $native Use native names for languages instead of English ones |
| 2211 |
|
* @return list of languages in the form 'code' => 'name' |
| 2212 |
|
*/ |
| 2213 |
|
public static function get_common_languages($native = false) { |
| 2214 |
|
$languages = array(); |
| 2215 |
|
foreach (Config::inst()->get('i18n', 'common_languages') as $code => $name) { |
| 2216 |
|
$languages[$code] = ($native ? $name['native'] : $name['name']); |
| 2217 |
|
} |
| 2218 |
|
return $languages; |
| 2219 |
|
} |
| 2220 |
|
|
| 2221 |
|
/** |
| 2222 |
|
* Get a list of commonly used locales |
|
@@ 2227-2233 (lines=7) @@
|
| 2224 |
|
* @param boolean $native Use native names for locale instead of English ones |
| 2225 |
|
* @return list of languages in the form 'code' => 'name' |
| 2226 |
|
*/ |
| 2227 |
|
public static function get_common_locales($native = false) { |
| 2228 |
|
$languages = array(); |
| 2229 |
|
foreach (Config::inst()->get('i18n', 'common_locales') as $code => $name) { |
| 2230 |
|
$languages[$code] = ($native ? $name['native'] : $name['name']); |
| 2231 |
|
} |
| 2232 |
|
return $languages; |
| 2233 |
|
} |
| 2234 |
|
|
| 2235 |
|
/** |
| 2236 |
|
* Get a list of locales (code => language and country) |