Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

i18n_get_translations()

Description

For a string in the language format, return all translations as an associative array
E.g. "en"->"English translation";
"fr"->"French translation"

Parameters

ColumnTypeDefaultDescription
$value string A string in the language format

Return

array

Location

include/language_functions.php lines 196 to 209

Definition

 
function i18n_get_translations($value)
    {
    

    
global $defaultlanguage;
    if (
strpos($value,"~")===false) {return array($defaultlanguage=>$value);}
    
$s=explode("~",$value);
    
$return=array();
    for (
$n=1;$n<count($s);$n++)
    {
    
$e=explode(":",$s[$n],2);
    if (
count($e) == && strlen($e[0]) > ) {$return[$e[0]]=$e[1];}
    }
    return 
$return;
    }

This article was last updated 19th April 2024 01:05 Europe/London time based on the source file dated 17th April 2024 14:35 Europe/London time.