Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
9 - 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: xlanguage in xoops 2.4
by cerbero on 2011/10/19 10:52:41

Quote:

vadimv82 wrote:


Got this error message:
Undefined variable: xoopsConfig in file /modules/xlanguage/api.php line 62

Fixed by adding global $xoopsConfig; to api.php

Works now.


Could you be more explicit? i have same trouble and dont know how can i solve,
thanks in advance
Re: xlanguage in xoops 2.4
by Dannomite82 on 2010/10/22 13:48:17

My problem thus far is in getting the module to recognize the language variable in the URL that the block generates. It always defaults to the system language. (I did a few echo tests to confirm this)

Running in debug mode and haven't noticed anything out of the ordinary. As for the version of PHP, pretty sure it's 4.

Any thoughts on this?

On a related note, how exactly is the language variable (say http://www.mysite.com/modules/mycontentmod/index.php?lang=french) passed to the module?

EDIT: I should note that I'm using the newest version of Xoops and the 3.11 version of the module.

EDIT 2: It appears as though the variable $xoopsconfig["language"] is being used to determine which language is used, and that the variable is stuck on the default system language regardless of the value of index.php?lang=yourlanghere.

EDIT 3: Problem solved.

In the functions.php file's xlanguage_ml function, I added:
le="color: #000000"><?php include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php'); $myLang = $xlanguage["lang"];


and replaced

le="color: #000000"><?php if(isset($xlanguage_langs[$xoopsConfig['language']])) { $lang = $xlanguage_langs[$xoopsConfig['language']]; $patterns[] = '/([([^]]*|)?'.preg_quote($lang).'(|[^]]*)?])('.$mid_pattern.')([/([^]]*|)?'.preg_quote($lang).'(|[^]]*)?])/isU'; $replaces[] = '$4'; }


with
le="color: #000000"><?php if(isset($xlanguage_langs[$myLang])) { $lang = $xlanguage_langs[$myLang]; $patterns[] = '/([([^]]*|)?'.preg_quote($lang).'(|[^]]*)?])('.$mid_pattern.')([/([^]]*|)?'.preg_quote($lang).'(|[^]]*)?])/isU'; $replaces[] = '$4'; }
Re: xlanguage in xoops 2.4
by titanus on 2010/7/14 23:37:56

Quote:
2) Made update for module in admin

can you explain me what exactly have you done?
I have a fresh xoops 2.4.5 and xlanguage 3.11 and it doesn't works.
It shows the angle brackets of the languages i don't have prefixed.
Ex: [it]ciao[/it][engood bye[/en] i see ciao[en]good bye[/en]

Can you help me?
Re: xlanguage in xoops 2.4
by vadimv82 on 2010/6/8 8:02:25

I have just made fresh install of Xampp 1.7.3.
With PHP: 5.3.1

Fresh install of Xoops 2.4.4. And installed xlanguage.

1) I just installed Xlanguages 3.11 as module
2) Made update for module in admin
3) added 2 base languages
4) Made block to be visible

And language switching is not working!!!


Got this error message:
Undefined variable: xoopsConfig in file /modules/xlanguage/api.php line 62

Fixed by adding global $xoopsConfig; to api.php

Works now.
Re: xlanguage in xoops 2.4
by vadimv82 on 2010/6/5 11:32:54

Very interesting.
Now language block is appeared. But language switching is not working. Interesting is that [lang_code] tags seems to be working, but only if i change default language in Admin console.
Doesn't work if i switch languages in language selection block.

Any ideas?

Who's Online

225 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 225


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits