MyBB Community Forums

Full Version: [F] untranslated plugins make forum die()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm setting up a board for an international community, so I'd like to use it in as many languages as possible (posts will be in english, but it's more user friendly to have the interface in the native language). For MyBB itself this works. But most plugins that can be translated come with only 1 or 2 language files.

I have my language set to dutch. But when I try to enter a page that uses a plugin that only has an english language file, MyBB exits with an error.

Shouldn't MyBB fall back to a default language when there is no translation in my language? This could be english (because I haven't seen any translatable plugins that don't have an english language file) or it could be the default board language (in which case the admin would have to be careful with which modules he installs). But you can't just die() if there is no translation.

For now, I use a shell script to work around this problem. I run this script after I have copied the plugin files to the server, but before I activate the plugin in the AdminCP.

Unfortunately I couldn't attach the script to this post, but if you have this same problem, send me a message and I'll mail it to you.

To use this script you need to have shell access to the server (or be creative with cron).

Rob
What is the error you receive?
/data/www/nerdstock.org/data/forum/inc/languages/dutch/lastxonucp.lang.php does not exist
But not only for this plugin, I had it with many more.

Grep tells me it must be line 146 of inc/class_language.php:
        if(file_exists($lfile))
        {
            require_once $lfile;
        }
        else
        {
            if($supress_error != true)
            {
                die("$lfile does not exist");
            }
        }
MyBB will now fallback on the English language before it gives up. Goes in your inc/ folder.

Ryan
"Thank you, Rob, for reporting this bug."

Thank you, Ryan, for fixing it.
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.