MINOR Documentation in DBLocale

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83968 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-08-06 21:24:15 +00:00
parent c65c6f40b6
commit 26d7985877

View File

@ -13,6 +13,11 @@ class DBLocale extends Varchar {
parent::__construct($name, $size);
}
/**
* See {@link getShortName()}.
*
* @return String
*/
function Nice() {
return $this->getShortName();
}
@ -21,6 +26,12 @@ class DBLocale extends Varchar {
return i18n::convert_rfc1766($this->value);
}
/**
* Resolves the locale to a common english-language
* name through {@link i18n::get_common_locales()}.
*
* @return String
*/
function getShortName() {
$common_names = i18n::get_common_locales();
return (isset($common_names[$this->value])) ? $common_names[$this->value] : false;