Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1

    Default Bi-lingual site and PHP to call equivalent page in second language

    Hi
    My website will need to be bi-lingual (French and English) and I'd like to use the same language button on all my pages. The English button would have the text "Français" and the French pages would have the same button with the text "English".

    How would I trigger a php script to call the equivalent page in the other language? I'm going to use another directory and another xar website file to handle the second language. I guess I'll need a lookup table to handle the name translation. For example, a page called "links.html" in English would be "liens.html" in French. It would also be nice to have a global php variable called $language that would be = "EN" or "FR" so that I could simplify the logic.
    Will this be possible or worth it to do this in Xara or will I just need to have separate buttons with hard-coded links on every page in both sites?
    Thanks again
    Elliot

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,487

    Default Re: Bi-lingual site and PHP to call equivalent page in second language

    I don't think you need a special script Elliot

    Create your two sites as two separate Xara documents. Publish the primary site to your server.

    On the server create a new folder, for example Français. Publish your French version to this sub-folder as if it is the primary site--index.htm page, index_html_files folder etc. In the publish settings, add this sub folder along with any specific sub-folder your web host requires. For example if you publish your files to a subfolder called public_html, then add a slash and the sub folder public_html/French

    Use the actual physical link for both versions. If your site is mysite.com and the English version is in the root directory of the server, then this is the link for the English version. Link the French version to the folder, for example mysite.com/French

    Does this make sense?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	publish settings.png 
Views:	257 
Size:	13.6 KB 
ID:	91134  

  3. #3

    Default Re: Bi-lingual site and PHP to call equivalent page in second language

    Hi gw,
    I'm probably being blind as usual but I don't understand how this will help me. I do plan to publish my French site to a different sub folder on the server. However how is this going to solve the linking problem of going from a particular page on the English site to the corresponding page with a different name on the French site?

    Using the same example a before, I'm on mysite.com/links.htm and I need to get to mysite.com/french/liens.htm. How to do it without putting in a different link for each language button on each page?

    Thanks

  4. #4
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,044

    Default Re: Bi-lingual site and PHP to call equivalent page in second language

    will I just need to have separate buttons with hard-coded links on every page in both sites?
    This would be the simplest solution. The alternative will need a script and database and both will need to be maintained by hand.

  5. #5

    Default Re: Bi-lingual site and PHP to call equivalent page in second language

    Thanks for the help

 

 

Tags for this Thread

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
  •