Skip to content

Commit

Permalink
ENHANCEMENT Added i18n::set_default_locale() to set standard locale (…
Browse files Browse the repository at this point in the history
…which is different from "current locale" retrieved through i18n::get_locale())

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@103581 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu authored and Sam Minnee committed Feb 2, 2011
1 parent f92e9d4 commit c8a338d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions core/i18n.php
Expand Up @@ -1685,25 +1685,35 @@ static function get_locale() {
}

/**
* @deprecated 2.4 Use Translatable::set_default_locale()
* @deprecated 2.4 Use Translatable::set_default_locale() or i18n::set_default_locale()
* @param $lang String
*/
static function set_default_lang($lang) {
Translatable::set_default_lang($lang);
}

/**
* @deprecated 2.4 Use Translatable::default_locale()
* @deprecated 2.4 Use Translatable::default_locale() or i18n::default_locale()
* @return String
*/
static function default_lang() {
return Translatable::default_locale();
}

/**
* @return String
*/
static function default_locale() {
return self::$default_locale;
}

/**
* @param String $locale
*/
static function set_default_locale($locale) {
self::$default_locale = $locale;
}

/**
* Enables the multilingual content feature (proxy for Translatable::enable()).
*
Expand Down

0 comments on commit c8a338d

Please sign in to comment.