SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Location
    Catalonia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi everyone.

    I'm using the everyone.net search plugin in my site. AX3 is in english and spanish, so I'd like to load a different menu (spanish or english) depending on the clicked link.

    That is:
    http://www.ax3.net/en > click to "search" (english)> load english menu.
    http://www.ax3.net/es > click to "buscar" (spanish) > load spanish menu.

    I've tried to explain it as easy as I could. I suppose it may be done with cookies...

    Any help is welcome & Thanks for advance.

  2. #2
    SitePoint Wizard jonese's Avatar
    Join Date
    Jul 1999
    Location
    Powder Springs GA (Atlanta)
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well you could either build 2 differant pages. or you could use ASP or PHP that would read a variable and if true it would display the proper .js

    example (basic basic code php)

    if (isset=$en)

    include for .js file english

    else

    include for .js file spanish

    endif;

    Again dont' take this code at face value. half the fun with this is learning to write it like me

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Location
    Catalonia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Jonese.

    But here is the main problem(s):
    - I can't use ASP or PHP because of my server.
    - Everyone.net search is as service provided remotely and i can only configure a template page.
    - I don't know quite nothing about ASP or PHP.

    In order to help all of you to help me i have "drawed" a map:

    AX3 English AX3 Spanish
    \ /
    AX3 search (everyone service)
    / \
    load eng_menu.js load spa_menu.js

    I've done all the possible to make it clear.
    I want to load a different menu in the 2 languages, but i need to mantain the preferences through all the search.

    We'll see...


    [Edited by ax3 on 09-13-2000 at 05:45 PM]

  4. #4
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    How do you have the search engine set up to determine between English and Spanish?

    For example, I speak english but like Julio Eglasias. If I search for him how would I be assured to get english pages?

    If I knew that I could tell you how to maintain your menus properly.
    Wayne Luke
    ------------


  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Location
    Catalonia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK. I'll try to explain better.

    My site is in english & spanish. I have a search service provided by -->everyone.net but i can only configure a template page (my menus, logos...) and the not editable part of the page is the "aim" of the search. So if you search (J. Iglesias, i.e.) you'll find english and whatever Iglesias' pages. I am only trying that my visitors can return to the main site (ax3.net) in the language they had choosen before.

    I paste the code they gave me to make the problem clear:

    <html>

    <head>
    <title>$PAGE_TITLE</title>
    </head>

    <body $BODY_CONTENT>
    <table width="100%" border="0" cellspacing="0" cellpadding="2">
    <tr height="1">
    <td valign="bottom" width="1%" align="center">$LOGOIMAGE</td>
    <td valign="bottom" width="99%" align="center">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td align="right" valign="bottom"><font face="Arial, Helvetica, sans-serif" size="-1"><a href="$SITEURL">Home</a></font></td>
    </tr>
    </table>
    <hr size=1 width="100%">
    </td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="4">
    <tr>
    <td valign="bottom" align="center">$ADVERTISEMENT</td>
    </tr>
    </table>
    <br>
    $PAGE_CONTENT
    </body>

    </html>
    --> The $ are the non-configurable sections.

    Thanks for your help again. I know the question is quite difficult.

  6. #6
    ********* Addict DLG_1's Avatar
    Join Date
    Jun 2000
    Location
    Texas, USA
    Posts
    596
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think your being too clear in explaining the problem, but here goes.

    when the person makes the KEY SELECTION (whether english or spanish) then set a cookie with the prefered language.

    when they go back to the main page, then read the cookie and direct the person to the proper page.

    simple, but not as efficient...remember that you're using a free service.


    sam

  7. #7
    SitePoint Enthusiast
    Join Date
    Aug 2000
    Location
    Catalonia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm quite desperate because i don't find the way to do it and how to explain the problem better.
    I've been checking few tutorials about cookies (few bcause i haven't fount more) and they are as clear as my last posts.

    I try again.
    2 versions (languages english (EN) & spanish(SP) ) of the site
    1 configurable remote search service

    That's what i pretend:
    Someone visiting version EN clicks to "search" button hosted in AX3 page, and it's transported to everyone.net search service; then an english menu is displayed.

    Someone visiting version SP clicks to "buscar" button... it's transported to the search service; then a spanish menu is displayed.

    That's it.

    As I don't know how to write a cookie i'd like you to show me howto, because if i can make one myself i could progress in my knowledge in javascript, cookies... I know that doing this with ASP or PHP would be much easier, but the host i'm paying doesn't allow them. I'll change the host next year.

    Thanks...


Bookmarks

Posting Permissions

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