Website with two languages

5 posts by 2 authors in: Forums > CMS Builder
Last Post: January 20, 2009   (RSS)

Re: [Dan Maitland] Website with two languages

By Dave - January 20, 2009

Hi Dan,

There's a few ways to do it.

Have a look at this post and then let me know if you have any questions:
http://www.interactivetools.com/forum/gforum.cgi?post=65118

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Website with two languages

Excellent but just one question about method 1. You said that I would have to create multiple viewer pages, which is fine but how does that work when I have to enter in the viewer url or do I just have to make sure that I have this code at the top of the page I want to display the results?

<?php

require_once "/home/something/mydomain.com/cmsAdmin/lib/viewer_functions.php";

list($whateverRecords, $whateverMetaData) = getRecords(array(
'tableName' => 'bios',
));

?>

Re: [Dan Maitland] Website with two languages

By Dave - January 20, 2009

With method 1, if you had a section called "News" and you wanted to display the french news on the french part of your site you might have a viewer url like this: /fr/news.php or /news_fr.php. Note that you'd have a file for each language.

And then instead of displaying the title like this: <?php echo $record['title'] ?>

You'd put in the name of the other language field such as: <?php echo $record['title_fr'] ?>

Let me know if that makes sense.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Website with two languages

That's exactly what I needed to know. Thanks a mill Dave.