1
Neuro-mancer
Suggestion: make xoops_load_lang_file() load english if no others found

If a XOOPS site is run in a language other than english and the admit adds a new module, xoops_load_lang_file() spills out an error message, if the language files for the local languate can't be found.

Suggestion: Make xoops_load_lang_file() revert to the english files, if the local ones can't be found.

This allows the admin to run modules, for which there is no local language support (or gives him/her some time to translate the files)

2
rowdie
Re: Suggestion: make xoops_load_lang_file() load english if no others found
  • 2005/10/31 20:38

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


The function does use the English files if the local language files aren't present, though it shouldn't be throwing PHP warning messages. Could you please report it as a bug on the core bug tracker?

As a quick fix you can always change the code to use the error suppression operator -> @

if ( !( $ret = [color=FF0000]@[/color]include_once( "$path/$lang/$filename.php" ) ) ) {

Thanks for reporting this

Rowd