Hi,
There have been a few requests for this sort of feature, but I've never been able to find a released MOD to accomplish this. However, I found a post
here that suggests a simple workaround that should be fine for your needs, assuming you only want Polish and English. It's not going to work exactly, since some changes have been made to phpBB since it was posted. You can find a version of the instructions that have been modified to fit your use case below. Please back up your database and your files before attempting this.
1. Add this to the bottom of includes/functions.php:
Code: Select all
function get_text_for_language($input, $lang)
{
$tmp = explode('#', $input);
$i = ($lang == 'pl') ? 0 : 1;
return $tmp[$i];
}
Note that this assumes that you want users who don't have a language specified to see English. If you would prefer them to see Polish instead, simply replace the 'pl' with 'en-gb' or 'en-us' (whichever version of English you have installed) and switch the 0 and the 1.
2. In any file that outputs
FORUM_NAME
to the template, in the following sort of format (though possibly slightly different):
Code: Select all
'FORUM_NAME' => $row['forum_name'],
change it to the following:
Code: Select all
'FORUM_NAME' => get_text_for_language($row['forum_name'], $user->data['user_lang']),
where $user needs to be a global variable. If you have problems with this step, let me know and I can identify the exact files and locations that need to be edited. One such file is includes/functions_display.php, so if you make the change in that file you should be able to see it working in some places.
3. Convert all your forum names to use the format "Informacje#Information" (Polish first). Note that there is a maximum of 255 characters for the entire string.
If there's enough interest in this I could turn this into an actual MOD. Let me know if this would be useful to you.