I have been trying to fix this for weeks but the answer escapes me.
Issue:
The default location for additional forum language images (the forum buttons) has the following directory structure;
modules/Forums/templates/YourTemplate/images/lang_xxx
Where 'xxx' is the language name i.e. lang_english or lang_german
This directory holds the forum button images e.g. New Topic, Reply etc.
Steps to reproduce:
Upload any additional language images to the directory above.
Nuke Preferences - language is English
Forum Config language is English
Forum Config - allow users to over ride style is TRUE
Amend your FORUM user profile language to a language other than English
Forum button images will still show in english.
Conclusion:
As changing forum config language default to the 'other' languge resolves the problem, it seems reasonably to assume that in includes/functions.php that the users preference[lang] is always being over ridden to the 'default' language.
Caveat
Where a nuke THEME contains a 'forums' directory (such as DeepBlue) the forum image buttons always use those in lang_english irrespective of any configuration settings.
Well, the text, is part of the button image yes, so there fore if you are using anything other than the default English language, the buttons have the text in the incorrect language as the forum uses the buttons from
modules/Forums/templates/subSilver/images/lang_english
This is assuming subSilver is the default template.
Additional language buttons, such as German for example are added in this path;
modules/Forums/templates/subSilver/images/lang_german/
For some reason, when functions.php checks to determine the users FORUM preference settings for language it fails to take that into consideration.
I have determined that the problem lies with two functions in functions.php these are;
function init_userprefs()
function setup_style()
The problem seems to lie with this line (around line 510 in the latest file)
As you can see, the path looks for the name of the default language only and does not take into consideration the users language preference setting in their forum profile at all.
Correct.
The problem is that there is no update for the forum language images.
You can change your 'prefered' language in the forum profile - not a problem but there does not seem to be anywhere that the forum images are updated accordingly.
Sorry if I am not explaining myself fully..........
If you got to the main forum page you can see a variety of images (buttons) for example 'New Topic', 'Reply to Topic' etc. These are held within the path
modules/Forums/language/lang_english/
As these buttons have text in them which tells you what they do, they are language specific.
If you change your user prefs to say German, the text links appear (quite correctly) in German but the buttons still use those in the lang_english directory.
We can utilise additional language appropriate buttons thus;
modules/Forums/language/lang_german
where the images are loaded into the lang_german directory
BUT unless you change the 'default' language in the forum config, lets say to German, the buttons will always be used from lang_english.
If I am interpreting the code correctly if offers the options of the forum default language images, the forum default language images or english images.
So with that code, the forums will always use a $img_lang with the value of 'english' UNLESS the forum config default is changed to say 'german' irrespective of whatever user preferences are in force.
So with that code, the forums will always use a $img_lang with the value of 'english' UNLESS the forum config default is changed to say 'german' irrespective of whatever user preferences are in force.
But the user preferences does change $board_config['default_lang'])
Code:
if ( !empty($userdata['user_lang']))
{
$board_config['default_lang'] = $userdata['user_lang'];
}
For some reason $userdata['user_lang'] is not generated or propagated correctly.
I have responded to your email.
Try not to think 'language' as in 'text' or 'translation' but in terms of images/ buttons.
Mind you it would have helped if I had posted the correct paths - doh!
For english it should be \modules\Forums\templates\subSilver\images\lang_english\post.gif (for the new post icon) for German language it should be \modules\Forums\templates\subSilver\images\lang_german\post.gif
as i have tried to learn and look throughout the code...i see somethin which tickled my fancy...i noticed return at the bottom of this function:
function init_userprefs($userdata)
i also noticed no reference to that function with this function:
function setup_style($style)
now im just curious as to this because i ran my phpEd on it and it claimed that the function init_userprefs($userdata) was ended.
now from what i can tell the function init_userprefs($userdata) defines to call on the correct language from the usersdata
and the function setup_style($style) returns the correct images.
this might be true but as my knowledge is limited its doubtfull..im curious if this is correct...i hope this helps
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Not sure why I didn't get a notification email for your post darklord - I'll have to check my spam box.
The useprefs DOES correctly set the textual language based on the user preferences i.e. any text links show as German if you set your profile prefs to 'German'.
The issue seems to be that when the userpref is checked, there is nothing to modify the language specific image directory UNLESS you change the 'default' language to German in the forum config area.
Then there is the added kicker that happens when you pick a nuke 'theme' that has forum files (fisubice/Deepblue ).
I'll get around to looking at this all over again when I've finished QA testing RN.
No worries Evaders.
I don't have any multilingual sites either but this thing is just irritating the heck out of me. If I can find your email address I may do a couple of screen shots for you to highlight exactly what I mean but I'll fix this one way or another any way - it is just finding the time.
I'll send you whatever code I change/add for evaluation in any event with a view to getting it included in BBtoNuke.