mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Documentation
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113241 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
db26c6c5ea
commit
20b41e1904
@ -1716,10 +1716,15 @@ class i18n extends Object {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current locale
|
||||
* See http://unicode.org/cldr/data/diff/supplemental/languages_and_territories.html for a list of possible locales
|
||||
* Set the current locale, used as the default for
|
||||
* any localized classes, such as {@link FormField} or {@link DBField}
|
||||
* instances. Locales can also be persisted in {@link Member->Locale},
|
||||
* for example in the {@link CMSMain} interface the Member locale
|
||||
* overrules the global locale value set here.
|
||||
*
|
||||
* @param string $locale Locale to be set
|
||||
* See {@link Translatable::set_locale()}.
|
||||
*
|
||||
* @param string $locale Locale to be set. See http://unicode.org/cldr/data/diff/supplemental/languages_and_territories.html for a list of possible locales.
|
||||
*/
|
||||
static function set_locale($locale) {
|
||||
if ($locale) self::$current_locale = $locale;
|
||||
@ -1752,7 +1757,14 @@ class i18n extends Object {
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the locale in which generated language files are (we assume US English with "en_US" by default).
|
||||
* This is the "fallback locale", in case resources with the "current locale"
|
||||
* (set through {@link set_locale()}) can't be found.
|
||||
*
|
||||
* If you just want to globally read/write a different locale (e.g. in a CMS interface),
|
||||
* please use {@link get_locale()} and {@link set_locale()} instead.
|
||||
*
|
||||
* For example, {@link Requirements::add_i18n_javascript()} and {@link i18n::include_by_class()}
|
||||
* use this "fallback locale" value to include fallback language files.
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
@ -1761,6 +1773,9 @@ class i18n extends Object {
|
||||
}
|
||||
|
||||
/**
|
||||
* See {@link default_locale()} for usage.
|
||||
*
|
||||
*
|
||||
* @param String $locale
|
||||
*/
|
||||
static function set_default_locale($locale) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user