FusionDirectory
Static Public Member Functions
Language Class Reference

This class contains all the function needed to manage languages. More...

Static Public Member Functions

static init ($lang=NULL)
 Initialize language configuration. More...
 
static detect ()
 Determine which language to show to the user. More...
 
static isAvailable (string $lang)
 Checks if a locale is available. More...
 
static getList ($ownLanguage=FALSE)
 Get the language for the user connecting. More...
 
static isRTL ($lang)
 Returns TRUE if $lang is a right to left language.
 

Detailed Description

This class contains all the function needed to manage languages.

Definition at line 30 of file class_Language.inc.

Member Function Documentation

◆ detect()

static detect ( )
static

Determine which language to show to the user.

Determines which language should be used to present fusiondirectory content to the user. It does so by looking at several possibilites and returning the first setting that can be found.

  1. Language configured by the user
  2. Global configured language
  3. Language as returned by al2gt (as configured in the browser)
Returns
string gettext locale string

Definition at line 98 of file class_Language.inc.

References get_userinfo().

◆ getList()

static getList (   $ownLanguage = FALSE)
static

Get the language for the user connecting.

Parameters
boolean$ownLanguageShould language names be stated in their own language as well

Definition at line 159 of file class_Language.inc.

◆ init()

static init (   $lang = NULL)
static

Initialize language configuration.

Parameters
string$langLanguage locale to use, defaults to self::detect()

Definition at line 37 of file class_Language.inc.

Referenced by config\set_current().

◆ isAvailable()

static isAvailable ( string  $lang)
static

Checks if a locale is available.

Parameters
string$langLanguage locale to use

Definition at line 135 of file class_Language.inc.


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