11
Burning
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/1/27 20:52

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


1 • Install xLanguage (no more hack needed) and create config file

2 • Copy function.xoLanguage.php in www/class/smarty/xoops_plugins and xoSmartyFunctions.php in Frameworks/smarty

3 • In your template (eg theme.html), use this code
<a href="<{xoLanguage tag="lang" language="english"}>" title="English">English</a>
<
a href="<{xoLanguage tag="lang" language="french"}>" title="French">French</a>



Note : to get flags, just replace Français and English by appropriates icons. You can also use defines (in a morphogenesis theme just add it in language files /english/main.php and /french/main.php)

Eg:

<div id="xo-language">
<
a href="<{xoLanguage tag="lang" language="english"}>" title="<{$smarty.const.THEME_ENGLISH}>"><img src="<{xoImgUrl icons/flags/english.png}>" alt="<{$smarty.const.THEME_ENGLISH}>" /></a>
<
a href="<{xoLanguage tag="lang" language="french"}>" title="<{$smarty.const.THEME_FRENCH}>"><img src="<{xoImgUrl icons/flags/french.png}>" alt="<{$smarty.const.THEME_FRENCH}>"/></a>
</
div>



Warning : if xolanguage plugin is not in /class/smarty/xoops_plugins ---> blank page !


12
Lupin
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/3/2 9:04

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


I read too much forum and I went confused ...

I have XOOPS 2.4.4 and php 5.2.12 ... I add folder "truck" in my webspace and rename it "xlanguage" .... then I install the module. ( 3.02 version in XOOPS version )

There is anything else to do ?

I tried and module xlanguage is not reachable in admin page

Menu :

-Language list
-Add Base Language
-Add Extended language give me "blank pages"

item:

- About this module : error 404 at address : ../modules/xlanguage/about.php

But about.php is not in main folder of xlanguage ... it is in xlanguage>admin folder ...

uff

Some suggestions ?

Thkx

Pino

13
Burning
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/3/2 9:58

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

Nothing to rename

Verify folders tree, you have to get :
- modules/
-- modules/xlanguage/
--- modules/xlanguage/xoops_version.php

Make sure folder xoops_data/caches/xoops_cache/ has the correct CHMOD 755.


14
Lupin
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/3/2 12:26

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


arf, arf ,arf ....

it works ... it was my fault : in modules>xlanguage>language>italian>admin , I forgot to close an item ...

So , if you are interested , HERE the translated folder (italian )

Thankxxxxxxxx

Pino

15
Burning
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/3/2 12:56

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


Thanks Lupin for translation, repository is updated :
https://xoops.org/modules/repository/singlefile.php?cid=111&lid=1624

16
alekseyevich
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0

I use three languages in one site. Apply the update xLanguage 3.02. When I edit a page using the Mastop publisb not charged the three languages for editing. Only the current language.
In earlier versions, when editing the text in different languages came like this: [en][/en], [pt][/pt] and [es][/es]. Has anyone experienced a problem like this? I'm with XOOPS 2.4.4. Thanks

17
wishcraft
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0

You can get xLanguage for XOOPS 2.4.4 with the preloader for it to run, you still need to modify the language path, but no more editing common.php..

http://cid-6580d2a11c091017.skydrive.live.com/browse.aspx/XOOPS%20Modules/X-Language

18
alekseyevich
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0

Hello Wishcraft. Thanks for the help. At this point I can make the change in the three languages in Mastop, but the index all the items being displayed in three languages equal to the format below when it should show only the current language.

[en] Acessibility[/en]
[es] Acessibilidad [/es]
[pt] Accessibilidade [/pt]

Are there any other setting that should be included in xLanguage that can fix this? Thanks

19
wishcraft
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0

First download and install following xoops2.4_xlanguage_3.1.zip

No open the readme.txt do step 2 in the globals.php file changing the define to support the variables. Should run, check this example of a showcase of www.frilogg.no

http://wishcraft.thruhere.net/iaeste/ (apache)
http://wishcraft.thruhere.net:81/iaeste/ (iis)

mashtop may need to include the following code in it processes..

Detection of xlanguage

$module_handler =& xoops_gethandler('module');
    
$xlanguage $module_handler->getByDirname('xlanguage');
    if ( 
is_object($xlanguage) && $xlanguage->getVar('isactive') == true 
    { 
$xlang true; } else { $xlang false; }


process of content to strip the languages

if ( $xlang == true ) { 
       include_once 
XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php';
       
$content xlanguage_ml($content);
    }

20
recupsoft
Re: Xoops 2.4.4 + xLanguage module + PHP 5.3.0
  • 2010/3/14 14:53

  • recupsoft

  • Friend of XOOPS

  • Posts: 151

  • Since: 2003/10/30


Great Wishcraft,

xLanguage 3.02 -> 3.1 = bug corrections? better XOOPS 2.4+ integration?

Xoops.org should be updated with an Article and modules repository.

Login

Who's Online

160 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits