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 226 to 242

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

This article was last updated 13th July 2025 21:35 Europe/London time based on the source file dated 28th January 2025 09:35 Europe/London time.