Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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

void

Location

include/language_functions.php lines 197 to 210

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]);
    if (
count($e)==2) {$return[$e[0]]=$e[1];}
    }
    return 
$return;
    }

This article was last updated 25th November 2020 04:35 Europe/London time based on the source file dated 7th July 2020 14:31 Europe/London time.