mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
c65c6f40b6
commit
26d7985877
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user