close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Creating a bilingual admin interface/web site?

Thread began 4/12/2010 9:19 pm by jciol2009 | Last modified 4/21/2010 10:32 am by Dani Chankhour | 2824 views | 3 replies |

jciol2009

Creating a bilingual admin interface/web site?

I'm wondering what would be the best approach in setting up PowerCMS for a bilingual web site.

I am developing a web site which is going to have two language editions (English & Japanese). Both editions will have an identical set of contents. My client will have a few staffs updating the contents of the site, they are all going to edit a single site but some of them will be editing the Japanese contents and will need a Japanese admin interface. I'm thinking the quickest option is to simply create two separate sites, each running a separate copy of PowerCMS, and translate the admin template in PowerCMS used for the Japanese version. Is this the best option, though? Do you guys have any suggestions for a better approach?

I think one drawback of the above approach would be the way site visitors have to switch languages. I could put a language switcher somewhere in the site template, but then it will always bring users back to a specified page (ex. top page) no matter which page they are actually in, unless I come up with some kind of dynamic link that detects what page the user is currently on and bring the user to a corresponding page in the other language site, or manually create a link in each page to correspond to a target page in the other site. (i.e. "About Us" page in English site should go to "About Us" page in Japanese site) The latter option is very tedious and it would become unmanageable as the site grows bigger. I imagine the former option might be possible with a single line of PHP code but I haven't learned how to do that in PHP.

Thank you in advance for your help!

(Update)
Would this work?:

<a href="language_switch.php)">Switch to (language name)</a>

In "language_switch.php":

<?php

$completeNewURL = "";

$referer = "$HTTP_REFERER ";
$brokenDownReferer = "";

if (stristr($referer, "/en/")){
$brokenDownReferer = str_replace("/en/", "/jp/", $referer);
}else{
$brokenDownReferer = str_replace("/jp/", "/en/", $referer);
}

//These two lines of code will redirect the user to the corresponding
//Japanese/English version of the page they were just on.

//print("$completeNewURL");
$URL="$brokenDownReferer";
header ("Location: $brokenDownReferer");

?>

Sign in to reply to this post

Dani Chankhour

Having two version of PowerCMS is going to be the approach that you want to take. and your folder structure should look like this:

Main Folder - call it "cms"
Sub Folder - call it "cms_en"
Sub Folder - call it "cms_jap"

On your index page, you could just have to links
<a href="cms_en">English</a><a href="cms_jap">Japanese</a>

I would also recommend that you run the installer separately for each cms version unless you are going to be using the same Database.

let me know if you have any questions.

Sign in to reply to this post

jciol2009

Regarding this:

Originally Said By: Dani Chankhour
  Having two version of PowerCMS is going to be the approach that you want to take. and your folder structure should look like this:

Main Folder - call it "cms"
Sub Folder - call it "cms_en"
Sub Folder - call it "cms_jap"

On your index page, you could just have to links
<a href="cms_en">English</a><a href="cms_jap">Japanese</a>  



I actually prefer that the index.php at the root level would automatically detect browser language and direct to a corresponding language version. I already know how and I already have a PHP script for it. What I'm looking for is a way to set up a language selector in, say, the header area of the main template which automatically figure out which page a visitor is currently on and render an URL path automatically.

Ex) Let's say John is on "About Us" page in English site. He selects Japanese in the language switcher, and it would bring him to "About Us" page in Japanese site. In the same manner, the same switcher in "News" page should direct him to "News" page in Japanese site. Of course I know I can set up something like this manually in HTML, but I would have to go through every single page and manually code it. I am looking for a way to make it so the switcher itself would detect which page it is currently on and automatically figure out a correct path upon rendering of the page. I am guessing a line of PHP would do this but not exactly sure how. Making sense?

Sign in to reply to this post

Dani Chankhour

It seems that you will need to add your script to the top of each page in order for this to work the way you need it to work. Can't you use the same script you have for redirecting to the right cms, to redirect the user to the correct page?

Please let me know if i misunderstood your question.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...