xoops forums


Just can't stay away
Posted on: 2008/6/13 11:04
kerkyra (Show more)
Just can't stay away
Posts: 553
Since: 2005/2/14

Re: xlanguage: more content in one language than other

add this line of code right before
include_once XOOPS_ROOT_PATH.'/footer.php';


then add this function at the end of index right before



function checklanguage() {
global $_GET,$xoopsDB;

include 'extract string file';<---- include the file with the function to split the text with the tags


$result = $xoopsDB->query("select hometext from ".$xoopsDB->prefix("ams_files")." where storyid= $story");
list($data) = $xoopsDB->fetchRow($result);

$swishdata= ExtractString($data, '[sw]','[/sw]');
$englishdata = ExtractString($data, '[en]','[/en]');

if ($swishdata==$englishdata || $englishdata == null || $englishdata == ""){

$xoopsTpl->assign('swishonly', "Swish Text Only");



then in the template file ams_index.html

add wherever you want to show the text <{$swishonly}>
not sure this will work havent looked at the code of the ams module to deeply
www.guidemap.gr - Beta is out...


Not too shy to talk
Posted on: 2008/6/13 12:18
Dona_Brasil (Show more)
Not too shy to talk
Posts: 153
Since: 2005/10/28

Re: xlanguage: more content in one language than other

Just a suggestion: clone your module and use one module per language.

- blogging in more than one languages slows down the rate at which you publish articles.
- xLanguage is cool (I am a user), but it has bad, bad effects on the ranking of your site in search engines as it uses ONE URL for DIFFERENT CONTENT as it stores your language preferences in a cookie (and search engines do not analyse cookies)
- of course, it is sympathic that you can switch language by clicking on a button, but a link to your main page in the other language is enough for most users.


Just popping in
Posted on: 2008/6/18 9:09
lukeon (Show more)
Just popping in
Posts: 17
Since: 2008/4/2 6

Re: xlanguage: more content in one language than other

thank you kerkyra!

I will try your solution when I'm back from holiday (beg. of July)
now unfortunately have no time to play with this :(

hej Dona_Brasil

thanks for suggestions, but it's an intranet service I'm building so search engines are no concern :) (argument 2)
And I wouldn't like to end up in having several different intranets depending on the language. The thing is that most "stuff" will be only in english (available for everyone) some stuff will be translated (to swedish and polish) as it is today (in a pdf file:) and some content will be in local languages only (available only for locals)

thank very much you for support and hear you soon!