Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: multilanguage indexu

  1. #1
    Join Date
    Jul 2003
    Posts
    5

    Default multilanguage indexu

    Hi,

    I'm thinking to use this great script to run a e-coupon site;
    i made a round in this forum and I noticed that the feature most request are this (exactly the feature I need):

    1.multilanguage site with one database: that means that is possible to add descrition and title for every category in different language and the users see the title, description ecc.ecc in the language he chose.(this i saw it in this 3d:

    http://www.nicecoder.com/community/s...light=language
    http://www.nicecoder.com/community/s...=multilanguage

    2.link expiration, like ads script

    3. paied for inclusion

    I'm really interest in this development, is this really possible?
    How much will it cost? How long will it nedd?

    Thanks
    (sorry for my english)

    ste

  2. #2
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    I can't help you with the language thing. Maybe create a table to hold the language stuff with a link to it based on the theme. Now that I might give it a shot.

    As for the expiring stuff and paid membership, I have completed an interface between dreamaccout at dreamcost and INDEXU. I just need to polish it up. this has been a big one for me so I will charge a fee for this interface.

    hey, dody, how about the forum for misc 3rd party hacks?!?!?
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  3. #3
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    anyne interested in running a beta test on the language hack if I develop one?
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  4. #4
    Join Date
    Jul 2003
    Posts
    5

    Default

    sure i'm interested, i would like also to give my contribute, the problem is that i have no license for indexu, so i can't work on it.

    I downloaded the lite version and with this database structure i think is really easy to make a multilanguage or multisite version.
    Just need to make:
    -insert new variable like en_description, it-description, de-descrition and so on for every language, and the same for title and other information
    -use different templates, every template use the variable it needs,
    english template use en_descrition, germana templeta uses de_description
    -use a variable lang to pass the information to every script
    (is possible to use section or better to add in the url of the script)
    like
    http://www.indexu.com/demo/index.php?lang=de

    what do u think about


    ste

  5. #5
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    well, I doubt that I do it for the lite version. I may take a look at it after I do the 3.1 version ( if I even do it for that version ).
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  6. #6
    Join Date
    Apr 2005
    Posts
    8

    Default multilang

    Hello ESM,

    Any luck with the multilang filter so far? I just ordered tha latest version of IndexU and was thinking of using a special tag with regex filters (<lang lang="fr">my link title or description</lang>, no changes to the database required and can control what links+ description are multilang). Do not need the templates since indexU engine will be embedded into another portal.

    Any idea if this was already done by a member of this community (regex)?

    Regards

    Sebby

  7. #7
    Join Date
    Nov 2004
    Posts
    36

    Default

    Esm did i read somewhere you use a different template system than index uses? Was curious about adding additional features to the template system in version 3 so I can avoid having extra templates just for rows of data

  8. #8
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by sebby
    Hello ESM,

    Any luck with the multilang filter so far? I just ordered tha latest version of IndexU and was thinking of using a special tag with regex filters (<lang lang="fr">my link title or description</lang>, no changes to the database required and can control what links+ description are multilang). Do not need the templates since indexU engine will be embedded into another portal.

    Any idea if this was already done by a member of this community (regex)?

    Regards

    Sebby
    I never did much with a multilanguage, if for no other reason that there was just a not enough activity at Nicecoder to justify it. Still isn't enough activity.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  9. #9
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by player77
    Esm did i read somewhere you use a different template system than index uses? Was curious about adding additional features to the template system in version 3 so I can avoid having extra templates just for rows of data
    Yep, I gave up on SMARTY about two years ago. Just way too complicated and code bloat beyond belief. I came across a templating program that was just right. Easy to use and with the necessary features (loops, IF, includes, etc) and small code size. If I were going to use SMARTY, I'd just do it in PHP instead. Anyway, here was the thread: http://www.nicecoder.com/community/s...ead.php?t=2098



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  10. #10
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    For some users upgrading is pain.
    But we can't avoid that, the script need to grow and better

  11. #11
    Join Date
    Nov 2004
    Posts
    36

    Default

    guess I should have downloaded that mod back when I was a member of indexuhelp. Actually i dont think i ever used any of the mods but they did give me ideas how to do some things myself. I gave up on v5 and im just sticking to what I was using before and making it do what I need. I made a plugin system for categories and news items but if I have say 50 plugins or functions i dont wanna have to create a rows type template for each one. Was just trying to figure out how to add the loop option to the old template system like smarty does

  12. #12
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    actually, v5 is coming along nicely, except for the bugs and SMARTY. While there don't seem to be any major problems except for one, probably somewhere in the next year or so, maybe most of the small ones will be discovered. Of course, that will depend on dody's involvement and the activity level of INDEXU (which has been fairly consistently low for at least the past two years).

    The one major problem that I see is the security issue that some folks have raised and which dody has taken under advisement. I mentioned it in response to an early post soon after v5.0.0 was released. While I am no where near an expert on the issue, I just think his treatment of the global variables needs to be examined for security issues.

    Hopefully, dody will resovle both the small bugs in a timely manner and that the global variables issue will be examined and dealt with soon.

    Oh, well... one can hope.

    There is just not much that can be done about SMARTY. Among other negative I have about it, I think it is just too difficult for the average INDEXU user. Heck, I think I am an above average INDEXU user and I have difficulty using SMARTY.

    If you are going to use v3.2, I can send you the zip file for my enhanced version. I think I still have it. I used my template system there. Actually, send me an email (see my signature).



    .
    Last edited by esm; 03-31-2006 at 04:32 PM.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  13. #13
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    In my opinion, smarty help a lot indexu gain higher level of flexibility and easiness. I'm sure you will be surprise when we release the new nicecoder.com website which will be released in next few days. It will be powered by indexu 5.1.0. Just wait and see

    To be fair, i have one negative comment about smarty. To increase the speed, smarty use compiled templates in php codes instead use the .html template. The purpose is to avoid template parsing which is time consuming compared with running php codes. The negative side, if you run the template for the first time, smarty will create a compiled version of the template. The compiled version is like regular php codes. Of course compiling from .html to .php will need execution time, so you may experience low performace for the first time run. But once the compiled version is created, there's no need any more to read and parse template files. So this is how smarty increse the speed.

  14. #14
    Join Date
    Apr 2005
    Posts
    8

    Default

    Hello all:

    I’ll turn back to the multilang issue, which was the initial subject of this thread.

    What I needed:
    • I needed to implement Indexu 5+ (nicely written script!!) in a multilang website (French and English)
    • I didn’t care to have an English only backend
    • Needed flexibility as not all my entries were multilang...
    Here the three steps I implemented to get a multilang frontend:

    (1) I’ve simply added the following function at the end of misc.lib.php (before closing tag)

    Code:
      // ----- MERIDIUM :: Multilang filter -----
    
    function format_text($string) {
    	$langtarget = array ('EN' => '\1', 'FR' => '\2');
    	if (!isset($_REQUEST['mlv'])) 
    		$langtag = 'EN'; //default lang if not specified
    	else 
    		$langtag = strtoupper($_REQUEST['mlv']); //set lang
    	
    	if( ! ( strpos($string,'<'.$langtag.'>')===false ) )  // check if $string is multilang
    		$string = preg_replace('/<EN>(.*?)<\/EN><FR>(.*?)<\/FR>/', $langtarget[$langtag], $string);
    
     return $string;
    }
    You'll notice I’ve created a multilang var ($mls) that must appear in your query string (or else default lang)…

    (2) When adding links and catedories, I used the following pattern for multilang entries (French or English only entries, use no tags)

    Code:
    <EN>EnglishString</EN><FR>FrenchString</FR>
    Then, all you need to do is use the format_text($yourstringtobeparsed) function for string translation here and there in the category.class.php and link.class.php and you’re done.

    Tweaks:
    Must be intermediate with PHP to implement this hack as this requires a lot of little mods in a couple of files to call the format_text function at the right places and to hard code de mlv var (if only I knew how to put this var in a session env...)… MySQL queries also need to be tweaks a little for proper sorting of links and categories(pattern matching needed). I will need to adapt the spider link to parse 2 URLs per multilang entry…

    With smarty it was pretty easy to call different headers and footer depending on the value of the mlv var.
    Code:
    <%if $header%>
    <%$header%>
    <%elseif $smarty.get.mlv == "FR"%>
    <%include file="header-fr.html"
              title="Browse by categories: $page_title"
              meta_keywords="$meta_keywords"
              meta_description="$meta_keywords"
    %>
    
    <%else%>
    <%include file="header.html"
              title="Browse by categories: $page_title"
              meta_keywords="$meta_keywords"
              meta_description="$meta_keywords"
    %>
    <%/if%>
    I though this mod to be straightforward as you can create an IndexU multilang web site (any combination of lang) just in a few minutes without duplicating entries, templates or altering database.

    I'm not done yet but at least it's a start. What do you guys think?

    Cheers,

    Seb
    Last edited by sebby; 04-04-2006 at 08:42 AM.

  15. #15
    Join Date
    Aug 2002
    Location
    Germany
    Posts
    1,180

    Default Smarty

    I think with Smarty you can simple force it in one template set or a second set, but my main problem is how to handle category names and my be link data in different languages ?

    Also if their is no support for search engines I think the page won't have big success...

    Frank

Similar Threads

  1. Replies: 26
    Last Post: 06-25-2007, 09:45 PM
  2. INDEXU v4.0 preview website.
    By dody in forum v5.x
    Replies: 93
    Last Post: 04-19-2005, 12:02 PM
  3. Indexu 4 ???? or Indexu PPC?
    By nooralam in forum v5.x
    Replies: 15
    Last Post: 06-07-2004, 04:04 PM
  4. Indexu v4 part 2
    By TLC in forum v5.x
    Replies: 5
    Last Post: 05-14-2004, 08:22 AM
  5. multilanguage indexu
    By ste in forum Help Wanted/Job Request
    Replies: 1
    Last Post: 07-22-2003, 08:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •