This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.
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 188.8.131.52 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
1. Logon to your site and go into the Administration, then Site Settings
2. Next to your site title, click on the drop-down and select "New Site"
3. The page loads again with a new site configuration, enter your new site name and click Save at the bottom.
Step 2: Make the site related
1. Using a file manager (from your hosting or using FTP), open the Web.config file in a text editor.
2. Change the following line
<add key="UseRelatedSiteMode" value="false">
to the following:
<add key="UseRelatedSiteMode" value="true">
3. Save the file (but don't close it) and go to step 3
Step 3: Force localization (language)
1. Still in Web.config, locate the following line:
<add key="UseCultureOverride" value="false">
Change it to:
<add key="UseCultureOverride" value="true">
2. Under this line add the following:
<add key="site1culture" value="en-US">
<add key="site2culture" value="fr-CA">
3. Modify "en-US" and "fr-CA" to the languages you want.
4. Save, but don't close yet, Web.config
Step 4: Create a sub-folder for your language(s)
1. 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.
2. Locate this line:
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="false">
And change it to:
<add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true">
3. 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)
4. Save and close (finally!) Web.config
Step 5: Add your content - tips and tricks
* 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).
I created a new page and linked to your blog post. Thanks a lot for the tutorial!
No problem, I love tutorials and when I can't find one that suits me... I just do it. I mean, I spent the time looking for this stuff myself, might as well save some other folks some time by sharing. Sharing is free and it makes people happy!
Hi can you provide some information regarding the next step after this. I configured my web.config file as you said. But i don't know what to do after those steps. How do i log in to my child site and add pages to it.
Same question as above... I created a new site, made the changes in web.config, created the folder ("Averti") and the Default.aspx empty file ...
What I got was an execution error when trying to access the main site. By setting customErrors to "off" in web.config, I can now access the main site, but do not know how to access the second site.
Well I guess this is my issue right here...: http://www.mojoportal.com/Forums/Thread.aspx?pageid=5&mid=34&ItemID=8&thread=2813