API - XOOPS 2.5.11 Beta 2
By monxoops.fr
language.php File Reference

Namespaces

namespace  upgrader
 

Functions

 xoops_analyzeLanguage ($str='', $envType='')
 
 xoops_detectLanguage ()
 

Variables

 $available_languages
 

Function Documentation

◆ xoops_analyzeLanguage()

xoops_analyzeLanguage (   $str = '',
  $envType = '' 
)

Analyzes some PHP environment variables to find the most probable language that should be used

Parameters
string$strstring to analyze
integer$envTypetype of the PHP environment variable which value is $str @global array the list of available translations @global string the retained translation keyword @access private
Returns
int|string
Here is the caller graph for this function:

◆ xoops_detectLanguage()

xoops_detectLanguage ( )
Returns
string
Here is the call graph for this function:

Variable Documentation

◆ $available_languages

$available_languages

phpMyAdmin Language Loading File All the supported languages have to be listed in the array below.

  1. The key must be the "official" ISO 639 language code and, if required, the dialect code. It can also contains some informations about the charset (see the Russian case).
  2. The first of the values associated to the key is used in a regular expression to find some keywords corresponding to the language inside two environment variables. These values contains:
    • the "official" ISO language code and, if required, the dialect code also ('bu' for Bulgarian, 'fr([-_][[:alpha:]]{2})?' for all French dialects, 'zh[-_]tw' for Chinese traditional...);
    • the '|' character (it means 'OR');
    • the full language name.
  3. The second values associated to the key is the name of the file to load without the '.php' extension.
  4. The last values associated to the key is the language code as defined by the RFC1766.

Beware that the sorting order (first values associated to keys by alphabetical reverse order in the array) is important: 'zh-tw' (chinese traditional) must be detected before 'zh' (chinese simplified) for example.

When there are more than one charset for a language, we put the -utf-8 first.