Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 213 to 226

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 13th November 2024 20:35 Europe/London time based on the source file dated 28th October 2024 11:15 Europe/London time.