61
mCity
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/11/7 14:58

  • mCity

  • Just popping in

  • Posts: 52

  • Since: 2003/3/31


Chris, I'd suggest to place /include/common.php after the language hack statement.

if language ru, setlocale(LC_ALL, "rus_RUS") else setlocale(...)

mCity

62
ibzan
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/11/7 18:33

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I haven't yet tried your idea, mostly because I stumbled into something a little easier.

Instead of having to force the system to check what the XOOPS language is I placed in the header the following code just around after line 63 where the line $xoopsTpl = new XoopsTpl(); is:

Quote:

$xoopsTpl->assign('the_locale', setlocale (LC_ALL, _SETLOCALE));
$xoopsTpl->assign('the_date' , strftime(_MYDATEFORMAT));


The first line, for lack of understanding AND better words assigns a variable the_locale for the function
setlocale(). You can get a nice definition for the function at www.php.net. I then used a global constant defined in the language file for each language, in this case _SETLOCALE, to en_EN for english and rus_RUS for Russian. This part can be left alone with.

The second function I also ran through the $xoopsTpl to both allow it to be formatted via my global constants but also to let me pull it directly into my theme by using smarty tags, in this once case I just called it in the theme like so:
Quote:

<{$the_date}>


Keeping the system from constantly checking sounds better to me anyway - this way, what ever language files are being read defines the content.

Thanks for your idea though, it at least got me to re-think what I was doing.

blessings,

Chris

63
hsalazar
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/11/7 21:35

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


Hi, Xoopsers:

This is just to let you know I've finished a XOOPS ML package. It's being presently tested by members of the core team and if we don't find major bugs, we'll release it beginning next week. This hacked XOOPS includes a lot of tweaks so most of the interface and content, both from the user side and from the admin side (with a few deliberate exceptions) are in the chosen language.

So if you can wait a little longer, it's just a matter of days.

Thanks.

Cheers.

64
svaha
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/11/7 23:08

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


I'm looking forward to that one Horacio, thanks for this.
Meanwhile I did some hacking myself with the ideas found here. I use amongst others Wellwines spotlight and weblogger module. Now I'm not a great programmer, so maybe you are willing to take a look at it and tell me if it is well formed, thanks.

modules\spotlight\blocks\kuht_head.php
Line 111 changed to :
Quote:
$title = substr($myts->makeTboxData4Show($myrow['title']), 0, ($options[3]-1))."...";


modules\weblog\blocks\weblog_recent.php
Line 133 changed to :
Quote:
$title = substr($myts->makeTboxData4Show($myrow['title']), 0, ($max_size -1))."...";


Modules/weblog/index.php
line 101 changed to :
Quote:
$myts =& MyTextSanitizer::getInstance();//HHTS
$category['cat_title'] = $myts->makeTboxData4Show($cat->getVar('cat_title', s'));//HHTS


Modules/weblog/index.php
line 114
Quote:
$myts =& MyTextSanitizer::getInstance();//HHTS
$chtitle = $subarr[$i]->$myts->makeTboxData4Show(getVar('cat_title', 's'));//HHTS
$myts =& MyTextSanitizer::getInstance();//HHTS

$subcats .= sprintf(', <a href=\'%s/modules/%s/index.php?user_id=%d&cat_id=%d\'>%s</a>',
XOOPS_URL, $xoopsModule->dirname(), $user_id,
$subarr[$i]->$myts->makeTboxData4Show(getVar('cat_id'), $chtitle));//HHTS

}


Modules/weblog/index.php
line 183

Quote:
$myts =& MyTextSanitizer::getInstance();//HHTS
$entry['title'] = $myts->makeTboxData4Show($entryObject->getVar('title'));


modules/weblog/details.php
line 92
Quote:
$myts =& MyTextSanitizer::getInstance();//HHTS
$xoopsTpl->assign('title', $myts->makeTboxData4Show($entryObject->getVar('title')));//HHTS


Aloha and Happy Xoopsing

65
svaha
Re: SOLVED - Making Xoops CONTENT Multilingual *Fixed Code Quote problem*
  • 2003/11/14 3:23

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Hi, I updated to Wellwines weblogger 1.30 and changed this :
Quote:
Weblog before 1.30
modules\weblog\blocks\weblog_recent.php
Line 133
$title = substr($myts->makeTboxData4Show($myrow['title']), 0, ($max_size -1))."...";

Changes to weblog 1.30
Modules/weblog/index.php
line 102

$myts =& MyTextSanitizer::getInstance();//HHTS

$category['cat_title'] = $myts->makeTboxData4Show($cat->getVar('cat_title','s'));//HHTS


line 115

$myts =& MyTextSanitizer::getInstance();//HHTS

$chtitle = $subarr[$i]->$myts->makeTboxData4Show(getVar('cat_title', 's'));//HHTS
$myts =& MyTextSanitizer::getInstance();//HHTS

$subcats .= sprintf(', <a href=\'%s/modules/%s/index.php?user_id=%d&cat_id=%d\'>%s</a>',
XOOPS_URL, $xoopsModule->dirname(), $user_id,
$subarr[$i]->$myts->makeTboxData4Show(getVar('cat_id'), $chtitle));//HHTS

}


line 181

$myts =& MyTextSanitizer::getInstance();//HHTS

$entry['title'] = $myts->makeTboxData4Show($entryObject->getVar('title'));


modules/weblog/details.php

line 96
$myts =& MyTextSanitizer::getInstance();//HHTS
$xoopsTpl->assign('title', $myts->makeTboxData4Show($entryObject->getVar('title')));//HHTS


Gotta be carefull with copying and pasting because sometimes a ' can get lost giving you a parse error.

Aloha

66
johny
Xoops ML package
  • 2003/11/14 13:11

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


I've put my site on-hold till the multi-language package comes out since there is just too much hardcoding, and correcting that hardcoding involved.

I look forward to the ML pack. I hope it will be available soon

The authors of it are kindly asked to post it here (or with instructions how to get it).

-a grateful member-

67
hrac
Different font usage
  • 2003/11/14 14:15

  • hrac

  • Quite a regular

  • Posts: 305

  • Since: 2002/7/15


hello,
What can I do, if I need two different font sets should be used for two different languages. Do I need to generate two different style.css file for each language? or is there any better way?

68
mvandam
Re: Different font usage
  • 2003/11/14 22:13

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


Depending how you choose to implement, there in general can be *both* languages on the same page. I guess you could add some FONT declaration surrounding text of a particular language that is picked out by the text sanitizer, similar to a post that was made in a different thread about add 'left-to-right' or 'right-to-left' declarations around certain language text.

I don't know much about fonts and how browsers deal with them... so I don't really understand what you mean by different font sets. Normally I use UTF-8 character set, choose the font 'times' or 'helvetica' or whatever and use bold/italic and my browser (IE 6) seems to render characters for non-english languages that look appropriate according to these settings.

69
johny
Re: Xoops ML package
  • 2003/11/15 10:09

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


I guess this is it:https://xoops.org/modules/news/article.php?storyid=1106

I'll try and implement my site with it now.

Thank you very much for this hack!
(the thanks goes to everyone)

70
svaha
Re: Xoops ML package
  • 2003/12/16 19:42

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Modified some module files to get multilingo :

Modifications

XCgallery V 1.1 :

Slight modifications to get multilingo captions and category :
File xcgal/include/functions.inc.php
Around line 211 : Changed to :
$caption = $rowset[$key]['title'] ? "<span class=\"thumb_title\">".$myts->makeTboxData4Show($rowset[$key]['title'])."</span>" : '';
Around line 617 : Changed to :
theme_display_thumbnails($thumb_list, $thumb_count, $myts->MakeTboxData4Show($album_name), $album, $cat, $page, $total_pages, is_numeric($album), $display_tabs)

Still work to do on lang files nederlands


ChatMx v 1 :

lang files nederlands


Blockies V 0.5 :

Slight modification to get multilingo module names :
File blockies/blocks/modulemenu.php
Around line 41 : Changed to :
$myts=& MyTextSanitizer::getInstance();
$block['mod_name'] = $myts->makeTboxData4Show($xoopsModule->getVar('name'));

BopComments :

Slight modification to get multilingo module names/topics/place
File BopComments/include/func.php
Around line 14 : Changed to :
$myts =& MyTextSanitizer::getInstance();
$modulelist[$array['dirname']]['name'] = $myts->makeTboxData4Show($array['name']);
Around line 23 : Changed to :
$myts =& MyTextSanitizer::getInstance();
$modulelist[$array['dirname']]['name'] = $myts->makeTboxData4Show($array['name']);


WF-section V 1.01 :
Slight modification to get the sel box multilingo.
File wfsection/class/wfstree.php
Around line 197 : Changed to :
$root=$myts->makeTboxData4Show($root);
$roottitle=$myts->makeTboxData4Show($roottitle);
Around line 217 : Changed to :
$name = $myts->makeTboxData4Show($name);
$name = "--&nbsp;$name";

Still working on lang files nederlands

Aloha

Login

Who's Online

240 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 240


more...

Donat-O-Meter

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

Latest GitHub Commits