Thursday 27 May 2010 8:36:44 am
Imagine that your new, award-winning website (siteaccess “new_site”) has been well so well received that your boss now wants to have it available in Chinese as well. We simply add another siteaccess (“chinese_new_site”) which will use the same data, but with different language settings.
1. Copy the 'new_site' directory under settings/siteaccess, and rename it to 'chinese_new_site'.
2. Edit settings/siteaccess/chinese_new_site/site.ini.append.php to show only Chinese:
[RegionalSettings] TextTranslation=enabled Locale=chi-CN ContentObjectLocale=chi-CN SiteLanguageList[]=chi-CN ShowUntranslatedObjects=disabled
3. Alter access-related settings :
[SiteSettings] SiteName=Public site two in CHINESE SiteURL=localhost/ez-4.3-webin/index.php/chinese_new_site SiteURL=example.com/index.php/ chinese_new_site # (or chinese_new_site.example.com) ? IndexPage=/content/view/full/176 DefaultPage=/content/view/full/176 RootNodeDepth=2 MetaDataArray[author]=John Doe MetaDataArray[copyright]=John Doe co.ltd MetaDataArray[description]=This is my public website number two in CHINESE, out of two on the same eZ instance MetaDataArray[keywords]=Public website two in CHINESE, multi-siteaccesses with eZ Publish
4. Edit settings/override/site.ini.append.php, adding
[SiteSettings] SiteList[]=chinese_new_site [SiteAccessSettings] AvailableSiteAccessList[]=chinese_new_site RelatedSiteAccessList[]=chinese_new_site HostMatchMapItems[]=chinese.example.com;chinese_new_site
5. Add chinese as a language for editors : navigate to Setup > Languages from the administration interface.
6. Allow anonymous login to this new siteaccess (make a ref to same procedure earlier above)
7. Clear the caches
Here is the final result after having added some content :