array determineLanguage(
string
$path, [string
$lang = NULL])
|
|
get the language that fits our needs.
if we are not absolutely sure if our language exist (and we are not), then we need to find out which one we can use.
param $path: absolute path to the directory where the language files are. also include the unique base name of the lang files. example: you have these files /some/dir/errors.en-us.txt /some/dir/errors.en.txt /some/dir/errors.de.txt /some/dir/errors.fr.txt so your call would look like determineLanguage('/some/dir/errors', 'en-uk'); which would load '/some/dir/errors.en.txt' (because en-uk does not exist). in this example the base name is "errors". the files have to end with '.txt'.
Tags:
Parameters: