XOOPS  2.6.0
Xoops_Locale Class Reference

Static Public Member Functions

static getClassFromDirname ($dirname)
 
static getThemeClassFromDirname ($dirname= '')
 
static getUserLocales ()
 
static loadLanguage ($name, $domain= '', $language=null)
 
static loadLocale ($domain= 'xoops')
 
static loadMailerLocale ()
 
static loadThemeLocale (XoopsTheme $theme)
 
static translate ($key, $dirname= 'xoops')
 
static translateTheme ($key, $dirname= '')
 

Static Public Attributes

static $_defaultLocale = 'en_US'
 
static $_userLocales = array()
 

Detailed Description

Author
trabis lusop.nosp@m.oema.nosp@m.s@gma.nosp@m.il.c.nosp@m.om
Version
$Id$

Definition at line 19 of file Locale.php.

Member Function Documentation

static Xoops_Locale::getClassFromDirname (   $dirname)
static
Parameters
string$dirname
Returns
string

Definition at line 162 of file Locale.php.

References $dirname.

static Xoops_Locale::getThemeClassFromDirname (   $dirname = '')
static
Parameters
string$dirname
Returns
string

Definition at line 172 of file Locale.php.

References $dirname, and Xoops\getInstance().

Here is the call graph for this function:

static Xoops_Locale::getUserLocales ( )
static

getUserLocales() Returns the user locales Normally it returns an array like this:

  1. Forced language
  2. Language in $_GET['lang']
  3. Language in $_SESSION['lang']
  4. HTTP_ACCEPT_LANGUAGE
  5. Fallback language Note: duplicate values are deleted.
Returns
array with the user locales sorted by priority. Highest is best.

Definition at line 193 of file Locale.php.

References $_SERVER, $_SESSION, and Xoops\getInstance().

Here is the call graph for this function:

static Xoops_Locale::loadLanguage (   $name,
  $domain = '',
  $language = null 
)
static
Parameters
string$nameName of language file to be loaded, without extension
mixed$domainstring: Module dirname; global language file will be loaded if $domain is set to 'global' or not specified array: example; array('Frameworks/moduleclasses/moduleadmin')
string$languageLanguage to be loaded, current language content will be loaded if not specified
Returns
boolean

Definition at line 32 of file Locale.php.

References $language, $name, $path, $xoops, Xoops\getInstance(), Xoops_Locale_Abstract\getLegacyLanguage(), and XoopsLoad\loadFile().

Here is the call graph for this function:

static Xoops_Locale::loadLocale (   $domain = 'xoops')
static
Parameters
string$domainstring: Module dirname; global language file will be loaded if $domain is set to 'global' or not specified
Returns
boolean

Definition at line 58 of file Locale.php.

References $path, $xoops, XoopsLoad\addMap(), XoopsLoad\fileExists(), and Xoops\getInstance().

Referenced by Xoops\loadLocale().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops_Locale::loadMailerLocale ( )
static
Returns
boolean

Definition at line 108 of file Locale.php.

References $xoops, XoopsLoad\addMap(), XoopsLoad\fileExists(), and Xoops\getInstance().

Referenced by Xoops\getMailer().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops_Locale::loadThemeLocale ( XoopsTheme  $theme)
static
Parameters
XoopsTheme$theme
Returns
bool

Definition at line 87 of file Locale.php.

References $xoops, XoopsLoad\addMap(), XoopsLoad\fileExists(), Xoops\getInstance(), and XoopsTheme\resourcePath().

Referenced by XoopsTheme\getLocalizationAssets().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops_Locale::translate (   $key,
  $dirname = 'xoops' 
)
static
Parameters
string$key
string$dirname
Returns
string

Definition at line 128 of file Locale.php.

References $dirname.

Referenced by createConfigform(), createThemeform(), UserconfigsConfigsForm\getForm(), SystemPreferencesForm\getForm(), SystemModule\installconfigs(), smarty_function_translate(), and Xoops\translate().

Here is the caller graph for this function:

static Xoops_Locale::translateTheme (   $key,
  $dirname = '' 
)
static
Parameters
string$key
string$dirname
Returns
string

Definition at line 145 of file Locale.php.

References $dirname.

Referenced by smarty_function_translateTheme().

Here is the caller graph for this function:

Member Data Documentation

Xoops_Locale::$_defaultLocale = 'en_US'
static

Definition at line 21 of file Locale.php.

Xoops_Locale::$_userLocales = array()
static

Definition at line 22 of file Locale.php.


The documentation for this class was generated from the following file: