i havbe a language file in my framework , which is basically an array
eng/language.php
<?php
return [
'HomeSearchtTitle'=>' search what you want ! ' ,
'wellcom'=>' Wellcom !' ,
'ResultSuccess'=>' here is the result ' ,
];
?>
i want to make the languages dynamic so the user can add new languages also be able to update this language.php
file directly by php
so need to fetch this array inside the language.php
viia file_get_contents and turn the string result to actual php array so i can present it to the user .... something like
$language = eval(str_replace(['<?php' , '?>' , 'return' ] , '' , file_get_contents("$dir_path/language.php")));
this always returns null
any idea how i should do that ?