11
kerkyra
Re: xlanguage: more content in one language than other
  • 2008/6/13 11:04

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


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

Quote:
checklanguage


then add this function at the end of index right before

?>

Quote:

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

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

$story=$_GET['storynum'];

$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...

12
Dona_Brasil
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.

13
lukeon
Re: xlanguage: more content in one language than other
  • 2008/6/18 9:09

  • lukeon

  • Just popping in

  • Posts: 17

  • Since: 2008/4/2 6


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!

Login

Who's Online

119 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 119


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