1 (edited by xkp 2013-11-04 09:57)

Topic: Question about language check.

Is there any function that checks the user language somewhere in .php files ?

The problem is that i have russian and bulgarian and is messy i need to do something like that.

if( user_language=ru ) {
      return $lang_common['Years'].' '.$way;
} else 
if( user_language=bg ) {
      return '.$way'. $lang_common['Years'].';
}

Re: Question about language check.

return sprintf($lang_common['Years'], $way);

in russian common.php

'Years' => 'бурум-пурум %s',

in bulgaria common.php

'Years' => '%s пурум-бурум' ,
ForkBB
I speak only Russian  :P

3 (edited by xkp 2013-11-04 11:49)

Re: Question about language check.

Thanks i'am gonna try that.

Btw i find this ( http://punbb.informer.com/wiki/punbb13/global_variables ) -- $forum_user['language']

And try it but not working.

if ($forum_user['language'] = 'Russian') {
return $lang_common['Years'].' '.$way;
} else
if ($forum_user['language'] = 'Bulgarian') {
return '.$way'. $lang_common['Years'].';
}