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");
?>