diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-05-29 14:37:49 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-05-29 14:37:49 +0000 |
commit | 36e87e190c637338d6fd7d72132d5e74913a674d (patch) | |
tree | 06248a35fe00ef5d9251782c8439fcc41b367fa4 /includes/bootstrap.inc | |
parent | af34a17925adaec3167d716d601701d80366d3ad (diff) | |
download | brdo-36e87e190c637338d6fd7d72132d5e74913a674d.tar.gz brdo-36e87e190c637338d6fd7d72132d5e74913a674d.tar.bz2 |
#147640 by Jose A Reyero with further cleanup by myself: add language code to localization functions
This makes it possible to call these functions with a given language code when sending emails to multiple users with different languages in a request for example.
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index a394a7c75..d0f9e5109 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1053,9 +1053,13 @@ function language_list($field = 'language', $reset = FALSE) { /** * Default language used on the site + * + * @param $property + * Optional property of the language object to return */ -function language_default() { - return variable_get('language_default', (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0)); +function language_default($property = NULL) { + $language = variable_get('language_default', (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0)); + return $property ? $language->$property : $language; } |