Since I've run into a few speed bumps while installing and configuring mojoPortal for use in a multilingual environment, I've decided to share my experience and what I have done to make it work with the help of multiple, complicated searches on google and the mojoPortal website. This tutorial will help you create a multilingual site that is linked together (users will be the same across all languages), but where the content is separate.
First of all, I'm assuming that you've already got mojoPortal running on your server and that it is fully functional. I'll also assume that you have already configured a main site, selected a skin, etc. Those basics are easy to figure out, and if you haven't - RTFM is your answer.
I'm using the 22.214.171.124 SQLite release of mojoPortal, but I'm assuming that this guide should be valid for at least a few releases before and after this particular one - if it isn't, please advise me and I'll make appropriate changes.
Step 1: Create a Child site
- Logon to your site and go into the Administration, then Site Settings
- Next to your site title, click on the drop-down and select "New Site"
- The page loads again with a new site configuration, enter your new site name and click Save at the bottom.
- Using a file manager (from your hosting or using FTP), open the Web.config file in a text editor.
- Change the following line
<add key="UseRelatedSiteMode" value="false">
to the following:
<add key="UseRelatedSiteMode" value="true">
- Save the file (but don't close it) and go to step 3
- Still in Web.config, locate the following line:
<add key="UseCultureOverride" value="false">
Change it to:
<add key="UseCultureOverride" value="true">
- Under this line add the following:
<add key="site1culture" value="en-US">
<add key="site2culture" value="fr-CA">
- Modify "en-US" and "fr-CA" to the languages you want.
- Save, but don't close yet, Web.config
- Because websites are more easily accessible using something like http://mywebsite.com/fr/ instead of something like "siteid=2", we need to first tell Web.config to support this.
- Locate this line:
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="false">
And change it to:
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true">
- Create a folder under your /www (or /wwwroot/) folder, and create a text file named "Default.aspx" under this folder (just an empty file, no content)
- Save and close (finally!) Web.config
- This setup completely separate the content between languages, so you will have to re-create all your pages, content, layout, etc. It can take a while to get used to the replication, but it's the best way technically and organizational-wise.
- This guide doesn't cover (yet?) how to create language links on the top, or how (if) it's possible to link directly to the same page in another language. I will be working on that next. One hurdle in doing this is that even if you detect what page you're on right now, that page name will most likely not be the same in different languages (unless you manually set the page names, which is a possibility).